Пример #1
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     stopper       = HitStopper.Instance;
     axeHealth     = maxHealth;
     swordHealth   = maxHealth;
     emptyDotColor = new Color(0.7f, 0.3f, 0.3f, 0.75f);
     UpdateHealthText();
     PopulateHealthDots();
     defaultSpriteColor       = Color.white;
     transparentSpriteColor   = Color.white;
     transparentSpriteColor.a = 0;
     isSword = true;
     Checkpoint.InitializeCheckpoints(transform.position);
 }
Пример #3
0
 void Start()
 {
     stopper    = HitStopper.Instance;
     groundMask = LayerMask.GetMask("Foreground");
 }