Пример #1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(this);
        }
        else
        {
            Destroy(this);
        }
        debug = DebugUtil.DrawText(transform.position, "", Color.red);
        debug.transform.SetParent(transform);

        isGrounded = collisions.CheckGrounded();
    }
Пример #2
0
 private void Awake()
 {
     HP           = maxHealth;
     debugHPLabel = DebugUtil.DrawText(GetComponent <AnimController>().sprite.position + Vector3.up, $"{HP}/{maxHealth}");
     debugHPLabel.transform.SetParent(GetComponent <AnimController>().sprite);
 }