Пример #1
0
    public override void GetAffectedCells()
    {
        affectedCells.Clear();

        // now does not account for radius
        Cell cell = TicTacToeGlobal.GetCell(c.transform.position);
    }
Пример #2
0
    // Update is called once per frame
    void Update()
    {
        var  e = GetComponent <Enemy>();
        var  a = GetComponent <Animator>();
        Cell c = TicTacToeGlobal.GetCell(transform.position);

        if (e.actionState == ActionState.Attack && a.GetCurrentAnimatorStateInfo(0).normalizedTime > 1 && !a.IsInTransition(0))
        {
            e.moveState   = MoveState.Move;
            e.actionState = ActionState.Idle;
            TicTacToeGlobal.RemoveMark(transform.position);
        }

        if (c.mark != null)
        {
            if (e.actionState != ActionState.Attack)
            {
                e.moveState   = MoveState.Stop;
                e.actionState = ActionState.Attack;
                a.SetTrigger("Attack");
            }
        }
    }