Esempio n. 1
0
 public override void GAwake()
 {
     base.GAwake();
     navComponent  = GetComponent <CNavComponent>();
     moveComponent = GetComponent <CMoveComponent>();
     moveComponent.ePassBy.AddListener((t) =>
     {
         foreach (Modifier m in modifiers)
         {
             m.OnPassFloor(GridManager.instance.GetFloor(t));
         }
     });
     outline   = GetComponent <Outline>();
     curHealth = maxHealth;
     healthBar = new HealthBar(this);
     for (int i = 0; i < modifiers.Count; i++)
     {
         modifiers[i] = Instantiate(modifiers[i]);
     }
     foreach (Modifier modifier in modifiers)
     {
         modifier.InitByOwner(this);
     }
     //healthBar.Hide();
 }
Esempio n. 2
0
    protected override void Awake()
    {
        base.Awake();

        navComponent  = GetComponent <CNavComponent>();
        moveComponent = GetComponent <CMoveComponent>();
        GridManager.instance.AddChess(this);
    }
Esempio n. 3
0
    protected override void Awake()
    {
        base.Awake();

        GameManager.instance.eRoundStart.AddListener(OnRoundStart);
        GameManager.instance.eRoundEnd.AddListener(OnRoundEnd);
        navComponent  = GetComponent <CNavComponent>();
        moveComponent = GetComponent <CMoveComponent>();
        GridManager.instance.AddChess(this);
    }
Esempio n. 4
0
 protected override void Awake()
 {
     base.Awake();
     moveComponent  = GetComponent <CMoveComponent>();
     agentComponent = GetComponent <CAgentComponent>();
 }