Пример #1
0
 void Start()
 {
     input           = InputManager3.Instance;
     myRigidbody2D   = GetComponent <Rigidbody2D>();
     myCollider      = GetComponent <BoxCollider2D>();
     myAnimator      = GetComponent <Animator>();
     groundLayerMask = LayerMask.GetMask("Ground");
     enemyLayerMask  = LayerMask.GetMask("Enemy");
     AttributeInitialize();
 }
Пример #2
0
 private void Awake()
 {
     if (Instance != null)
     {
         Destroy(gameObject);
     }
     Instance = this;
     DontDestroyOnLoad(gameObject);
     KeyInit();
 }