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(); }
protected override void Awake() { base.Awake(); navComponent = GetComponent <CNavComponent>(); moveComponent = GetComponent <CMoveComponent>(); GridManager.instance.AddChess(this); }
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); }
protected override void Awake() { base.Awake(); moveComponent = GetComponent <CMoveComponent>(); agentComponent = GetComponent <CAgentComponent>(); }