Ejemplo n.º 1
0
        private void Start()
        {
            m_robotMove      = new RobotMovement(this.transform);
            m_robotAnimation = new RobotAnimation(GetComponent <Animator>());

            m_robotMove.OnMoveEnd += MoveComplete;
            m_robotMove.OnMoveEnd += CheckIfWon;

            UponReachingFinish += Win;

            List <Vector3> list = new List <Vector3>();

            for (int i = 0; i < m_StepAmount; i++)
            {
                list.Add(transform.position + new Vector3(i * m_DistanceStep, 0, 0));
            }

            m_robotMove.PrecalculatePath(list.ToArray());
        }
Ejemplo n.º 2
0
        private void Start()
        {
            m_robotMove = new RobotMovement(this.transform);
            m_robotAnimation = new RobotAnimation(GetComponent<Animator>());

            m_robotMove.OnMoveEnd += MoveComplete;
            m_robotMove.OnMoveEnd += CheckIfWon;

            UponReachingFinish += Win;

            List<Vector3> list = new List<Vector3>();

            for (int i = 0; i < m_StepAmount; i++)
            {
                list.Add(transform.position + new Vector3(i * m_DistanceStep, 0, 0));
            }

            m_robotMove.PrecalculatePath(list.ToArray());
        }