Example #1
0
    public new void SetTargetPoint(Vector3 newTargetPoint)
    {
        Vector3[] formation = GroupMovement.ArcDefensiveFormation(groupedUnits, newTargetPoint, GameManager.Instance.playersHolder.allPlayers[gameObject.GetComponentInParent <Unit>().myPlayer.playerNumber].playerCamera.transform.right, .1f);
        int       i         = 0;

        foreach (Walkable walkable in groupedUnits)
        {
            walkable.GetComponent <Walkable>().SetTargetPoint(new Vector3(formation[i].x, walkable.transform.position.y, formation[i].z));
            i++;
        }
    }
	void Start()
	{
		obstacle = transform.parent.gameObject;
		monkGroup = GameObject.FindGameObjectWithTag("MonkGroup").GetComponent<GroupMovement>();
	}