using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HealthKit : MonoBehaviour
{
[SerializeField]
private int restoresHealth;
void OnCollisionEnter2D(Collision2D collision)
{
var player = collision.gameObject.getComponent<Player>();
if(player != null){
player.ReceiveHeal(restoresHealth);
Destroy(gameObject);
}
}
}
document.querySelector('input[name="D"]').value = DNUM
document.querySelector('input[name="I"]').value = INUM
document.querySelector('input[name="S"]').value = SNUM
document.querySelector('input[name="C"]').value = CNUM
const data = {
D: DNUM,
I: INUM,
S: SNUM,
C: CNUM,
}
а дальше как в этом примере