Пример #1
0
    public void ChangeDroid()
    {
        //becuase of using random droid doesnt change on all clicks
        currentDroid.DecreaseHealthBar();
        currentDroid.ResetPlayerControl();
        PlayerManager.instance.removeCurrentDroid();
        int rand = UnityEngine.Random.Range(0, playerDroids.Count);

        currentDroid = playerDroids[rand];
        PlayerManager.instance.setCurrentDroid(currentDroid);
        currentDroid.setPlayerControl();
        currentDroid.IncreaseHealthBar();
        CameraController.instance.setTransform(currentDroid.transform);
    }