public void RandomColor() { var rendIndex = Random.Range(0, 2); DummyColor = rendIndex > 0 ? TrainingWeaponEnum.Red : TrainingWeaponEnum.Blue; Rend.material = rendIndex > 0 ? RedDummyMaterial : BlueDummyMaterial; }
public void Hit(TrainingWeaponEnum weaponColor) { if (!Attacking) { return; } if (weaponColor == DummyColor) { TrainingDummyController.Instance.CurrentCorrectHits++; } else { TrainingDummyController.Instance.CurrentFalseHits++; } Attacking = false; }
public void BlueColor() { SetColor(Color.blue); DummyColor = TrainingWeaponEnum.Blue; }
public void RedColor() { SetColor(Color.red); DummyColor = TrainingWeaponEnum.Red; }