100coding
3/30/2017 - 7:49 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 GameRunner : ITickable
{
    private readonly Ship ship;

    public GameRunner(Ship ship)
    {
        this.ship = ship;
    }

    public void Tick()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            this.ship.Take_damage(10);
        }
    }
}