コード例 #1
0
 public void DeregisterSteeringBehaviour(SteeringBehaviour behaviour)
 {
     behaviours.Remove(behaviour);
 }
コード例 #2
0
 public void RegisterSteeringBehaviour(SteeringBehaviour behaviour)
 {
     behaviours.Add(behaviour);
 }
コード例 #3
0
ファイル: SteeringAgent.cs プロジェクト: Klipi/SpaceAlert
 public void DeregisterSteeringBehaviour(SteeringBehaviour behaviour)
 {
     behaviours.Remove(behaviour);
 }
コード例 #4
0
ファイル: SteeringAgent.cs プロジェクト: Klipi/SpaceAlert
 public void RegisterSteeringBehaviour(SteeringBehaviour behaviour)
 {
     behaviours.Add(behaviour);
 }
コード例 #5
0
    public void TurnOn(Behaviour B)
    {
        switch (B)
        {
        case Behaviour.Arrive:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Arrive");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.Evade:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Evade");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.Flee:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Flee");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.Flock:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Flock");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.FollowPath:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.FollowPath");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.Pursue:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Pursue");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;

        case Behaviour.Seek:
        {
            Steer2D.SteeringBehaviour SteeringBeh = GetBehaviourByTypeName("Steer2D.Seek");

            if (SteeringBeh)
            {
                SteeringBeh.enabled = true;
            }
        }
        break;
        }
    }