예제 #1
0
    public void RandomColor()
    {
        var rendIndex = Random.Range(0, 2);

        DummyColor    = rendIndex > 0 ? TrainingWeaponEnum.Red : TrainingWeaponEnum.Blue;
        Rend.material = rendIndex > 0 ? RedDummyMaterial : BlueDummyMaterial;
    }
예제 #2
0
    public void Hit(TrainingWeaponEnum weaponColor)
    {
        if (!Attacking)
        {
            return;
        }

        if (weaponColor == DummyColor)
        {
            TrainingDummyController.Instance.CurrentCorrectHits++;
        }
        else
        {
            TrainingDummyController.Instance.CurrentFalseHits++;
        }
        Attacking = false;
    }
예제 #3
0
 public void BlueColor()
 {
     SetColor(Color.blue);
     DummyColor = TrainingWeaponEnum.Blue;
 }
예제 #4
0
 public void RedColor()
 {
     SetColor(Color.red);
     DummyColor = TrainingWeaponEnum.Red;
 }