Esempio n. 1
0
    public void Start()
    {
        GameManager.Instance.RegisterUnit(this);
        PlayerOwner.RegisterUnitToPlayer(this);

        fSMObject = Instantiate(fSMObjectPrefab, transform) as GameObject;
        fSM       = fSMObject.GetComponent <FSM>();
        ((UnitFSM)fSM).SetUnitOwner(this);
        InitHealthBar();
    }