void Update() { UpdateColorVariables(); if (minionColorQuantity == 1) { lastColor = totalColor; } if (minionColorQuantity <= 0) { Die(); } ColorManager(); if (ActualHex.x == Map.width - 1) { TutorialManager.gameOver = true; } if (ActualHex.turret != null) { ActualHex.TurretDealDamage(); return; } if (ActualHex.HexColor == 'W' || !neutralHex) { MovementRandom(); } else { Colision(); } //FER UPDATE DE LES VARIABLES DE L'SCRIPT "COLOR COMPONENTS" cyanQuantity = ownColor.cyanComponent; magentaQuantity = ownColor.magentaComponent; yellowQuantity = ownColor.yellowComponent; ownColor.actualHex = ActualHex; }
void Update() { UpdateColorVariables(); if (minionColorQuantity <= 0 || ActualHex == null) { Die(); } if (minionColorQuantity == 1) { lastColor = totalColor; } ColorManager(); if (ActualHex.x == Map.width - 1) { tutorialManagerInstance.GameOver(); } if (ActualHex.turret != null) { anim.SetBool("isEating?", true); ActualHex.TurretDealDamage(); return; } if (ActualHex.HexColor == 'W' || !neutralHex) { anim.SetBool("isEating?", false); MovementRecte(); } else { Colision(); } }