コード例 #1
0
ファイル: SoldierPawn.cs プロジェクト: Gval/SomeGameThird
    // Use this for initialization
    void Start()
    {
        controller       = GetComponent <CharacterController> ();
        healthManager    = GetComponent <HealthManager> ();
        signalSender     = GetComponentInChildren <SignalSender> ();
        pheromoneManager = GetComponentInChildren <PheromoneManager> ();

        for (int i = 7; i >= 0; i--)
        {
            enemyDirection.Add(0);
            friendDirection.Add(0);
            deadDirection.Add(0);
            treeDirection.Add(0);
        }

        InvokeRepeating("CleanPheromone", 0.1f, pheromoneCleanRepeat);
        InvokeRepeating("SendPheromone", 0.1f, pheromoneCleanRepeat);

        pheromoneAngles.Add(0);
        pheromoneAngles.Add(45);
        pheromoneAngles.Add(90);
        pheromoneAngles.Add(135);
        pheromoneAngles.Add(180);
        pheromoneAngles.Add(225);
        pheromoneAngles.Add(270);
        pheromoneAngles.Add(315);
    }