//public float[] testColour = new float[4] { 0f, 1f, 0f, 1f }; // public float[,] AllColourChange = new float[4] { 1f, 0.3f, 0.45f, 1f }; // FIND OUT HOW TO DO 2D ARRAYS #endregion void Start() // ASSIGNES BOTH RIGIDBODY AND ANIMATOR FOR ANIMATION STATE { moveSpeedSneek = moveSpeed / 6; #region Takes how long your invinc, / how many blinks, / 2 each half of loop // /* */ invicTime = invicTime / numOfLoopsOfBlink; // / is with remainders % is not invicTime = invicTime / 2; #endregion /* * if (jumpSFX.isActiveAndEnabled) * { * * }else * { * * } */ sword = FindObjectOfType <SwordHurtEnemy>(); weaponAmmo = GetComponent <weaponAmmo>(); healthManager = GetComponent <HealthManager>(); rb2dPlayer = gameObject.GetComponent <Rigidbody2D>(); anim = gameObject.GetComponent <Animator>(); canhit = true; gravityStore = rb2dPlayer.gravityScale; } // End Start
// Use this for initialization void Start() { player = FindObjectOfType <Player>(); sword = FindObjectOfType <SwordHurtEnemy>(); }