public void SetDifficulty() { CrabAI c = CrabAI.Instance; c.moveSpeed = crabMoveSpeed; c.slamTelegraphTime = slamTelegraphTime; c.slamRecoveryDelay = slamRecoveryDelay; c.slamRecoverTime = slamRecoverTime; c.slamAttackDuration = slamAttackDuration; c.throwTelegraphTime1 = throwTelegraphTime1; c.throwTelegraphTime2 = throwTelegraphTime2; c.throwMaxAmount = throwMaxAmount; c.throwMinAmount = throwMinAmount; c.laserXDuration = laserXDuration; c.laserXStartDelay = laserXStartDelay; c.laserXEndDelay = laserXEndDelay; c.laserFollowDuration = laserFollowDuration; c.laserFollowSpeed = laserFollowSpeed; c.laserFollowStartDelay = laserFollowStartDelay; c.timeBetweenAttacks = timeBetweenAttacks; c.availableMoves = level; Debug.Log("Level up!"); UIController.Instance.Level++; }
void Awake() { cAI = gameObject.GetComponentInParent<CrabAI> (); }
private void Awake() { Instance = this; }