Initial Commit

This commit is contained in:
Sebastian Cabrera 2021-08-02 05:44:37 -04:00
parent 53eb92e9af
commit 270ab7d11f
15341 changed files with 700234 additions and 0 deletions

View file

@ -0,0 +1,35 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using MLAPI.Messaging;
public class HealthPickup : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
[ServerRpc]
void OnTriggerEnter(Collider collider)
{
if (collider.tag == "Player")
{
gameObject.SetActive(false);
var player = collider.GetComponent<PlayerHealth>();
if (player != null)
{
player.Heal(10f);
}
}
}
}