コード例 #1
0
    public void InitializeMe()
    {
        sensory = gameObject.GetComponent<AnimalSensory>();
        body = gameObject.GetComponent<AnimalBody>();
        brain = gameObject.GetComponent<AnimalBrain>();
        stateMachine = gameObject.GetComponent<AnimalStateMachine>();
        possesor = GameObject.FindGameObjectWithTag("Player").GetComponent<PhantomController>();
        moveSpeed = body.moveSpeed;
        isInitialized = true;

        if(stateMachine.myType == AnimalType.prairieDog)
            jumpController = gameObject.GetComponent<JumpController>();
    }
コード例 #2
0
 void Start()
 {
     controller = gameObject.GetComponent<PhantomController>();
     tracker = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<LevelMap>();
 }
コード例 #3
0
 public void Start()
 {
     OurPC = GetComponent <PhantomController>();
 }