예제 #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();
 }
예제 #2
0
    protected override void Awake()
    {
        base.Awake();

        navComponent  = GetComponent <CNavComponent>();
        moveComponent = GetComponent <CMoveComponent>();
        GridManager.instance.AddChess(this);
    }
예제 #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);
    }