100coding
3/30/2017 - 7:25 AM

Creating Sub-Containers on GameObject's by using Game Object Context

Creating Sub-Containers on GameObject's by using Game Object Context

using UnityEngine;
using Zenject;

public class Ship : MonoBehaviour
{
    private ShipHealthHandler health_handler;

    [Inject]
    public void Construct(ShipHealthHandler health_handler_injection)
    {
        this.health_handler = health_handler_injection;
    }

    public void Take_damage(float damage)
    {
        this.health_handler.Take_damage(damage);
    }
}