示例#1
0
        void Start()
        {
            wander = GetComponent <WanderPlusAvoid>();
            if (wander == null)
            {
                Debug.LogError(gameObject + " has no WanderPlusAvois attached in " + this);
            }

            arrive = GetComponent <ArrivePlusAvoid>();
            if (arrive == null)
            {
                Debug.LogError(gameObject + " has no ArrivePlusAvoid attached in " + this);
            }

            blackboard = GetComponent <MOUSE_Blackboard>();
            if (blackboard == null)
            {
                blackboard = gameObject.AddComponent <MOUSE_Blackboard>();
            }

            // the global blackboard it's better created by an external agent
            // or (if has to be created here) must come from a class implementing the SINGLETON PATTERN

            wander.enabled = false;
            arrive.enabled = false;
        }
 private void Start()
 {
     blackboard      = GetComponent <ThrowHandsEnemyBlackboard>();
     enemyPassiveFSM = GetComponent <ThrowHandsEnemyPassiveFSM>();
     wanderPlusAvoid = GetComponent <WanderPlusAvoid>();
     arrivePlusAvoid = GetComponent <ArrivePlusAvoid>();
 }
示例#3
0
    private void Start()
    {
        blackboard      = GetComponent <ThrowHandsEnemyBlackboard>();
        wanderPlusAvoid = GetComponent <WanderPlusAvoid>();
        arrivePlusAvoid = GetComponent <ArrivePlusAvoid>();

        timer = 0;
    }
示例#4
0
 private void Start()
 {
     blackboard      = GetComponent <ChargingEnemyBlackboard>();
     wanderPlusAvoid = GetComponent <WanderPlusAvoid>();
     seek            = GetComponent <Seek>();
     enemyPassiveFsm = GetComponent <ChargingEnemyPassiveFSM>();
     enemyCol        = GetComponent <CapsuleCollider>();
 }
    void SetWanderPlusAvoidVariables()
    {
        WanderPlusAvoid wanderPlusAvoid = GetComponent <WanderPlusAvoid>();

        wanderPlusAvoid.wanderRate   = wanderRate;
        wanderPlusAvoid.wanderRadius = wanderRadius;
        wanderPlusAvoid.wanderOffset = wanderOffset;

        wanderPlusAvoid.lookAheadLength       = lookAheadLength;
        wanderPlusAvoid.avoidDistance         = avoidDistance;
        wanderPlusAvoid.secondaryWhiskerAngle = secondaryWhiskerAngle;
        wanderPlusAvoid.secondaryWhiskerRatio = secondaryWhiskerRatio;
        wanderPlusAvoid.avoidLayers           = avoidLayers;
        wanderPlusAvoid.scanner = scannerSphereCollider;
    }