コード例 #1
0
 // Use this for initialization
 void Start()
 {
     audioSource  = GetComponent <AudioSource>();
     anima        = GetComponent <Animator>();
     player       = GameObject.FindGameObjectWithTag("Player");
     aggroScript  = GetComponentInChildren <AggroBox>();
     obstacle     = GetComponentInChildren <ObstacleDetection>();
     playerScript = player.GetComponent <PlayerStateController>();
 }
コード例 #2
0
    private void Awake()
    {
        if (!center)
        {
            ProvideCenterObject();
        }

        center.position = transform.position;

        obstacleDetection = GetComponent <ObstacleDetection>();
        positionByCell    = GetComponent <PositionByCell>();
    }