コード例 #1
0
    void Awake()
    {
        cameraController   = FindObjectOfType <ThirdPersonCameraController>();
        movementController = FindObjectOfType <GabrielsMovementController>();
        animatorController = FindObjectOfType <GabiesAnimationController>();
        AudioManager.Instance.PlaySong(3, 0.2f);

        if (PlayerPrefs.GetInt("SaveHealth", 0) == 1)
        {
            Health  = 100f;
            Stamina = 100f;
            PlayerPrefs.SetInt("SaveHealth", 0);
        }


        if (Time.timeScale == 0)
        {
            Time.timeScale = 1f;
        }

        if (gabie != null && gabie != this)
        {
            Destroy(gameObject);
        }
        else
        {
            gabie = this;
        }
    }
コード例 #2
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "DropRespawn")
     {
         player = GameObject.FindGameObjectWithTag("Player").GetComponentInParent <GabrielsSystemManager>();
         player.TakeDamage(fallDamage);
         tempPosition.position = savedPos;
     }
 }
コード例 #3
0
 void Start()
 {
     player = GabrielsSystemManager.gabie;
 }
コード例 #4
0
 void Start()
 {
     stats = GetComponent <GabrielsSystemManager>();
 }
コード例 #5
0
 public void Consume(GabrielsSystemManager stats)
 {
     throw new NotImplementedException();
 }