コード例 #1
0
        public virtual void Start()
        {
            if (health <= 0)
            {
                health = 1;
            }

            if (maxHealth < health)
            {
                maxHealth = health;
            }

            if (takeDamageAudioClip || recoverHealthAudioClip)
            {
                audioSource = AudioManager.AudioSourceInstance;
            }

            controller = GetComponent <Controller2D> ();
        }
コード例 #2
0
 // Use this for initialization
 public virtual void Start()
 {
     controller = GetComponent <Controller2D> ();
 }
コード例 #3
0
 void Start()
 {
     controller = transform.parent.GetComponent <Controller2D> ();
 }
コード例 #4
0
        // Use this for initialization
        void Start()
        {
            player = FindObjectOfType <PlayerController> ();

            isFollowing = true;
        }