private void Start()
    {
        turnScript = manager.gameObject.GetComponent <Turn_Script>();

        currentHealth = maxHealth;
        slider.value  = currentHealth;
    }
    void Awake()
    {
        // Seed for random number generator
        seed = System.DateTimeOffset.UtcNow.ToUnixTimeSeconds();
        Random.InitState((int)seed);

        AI_Script = GetComponent <Turn_Script>();
    }
Esempio n. 3
0
    private void Awake()
    {
        // So no warnings get thrown
        player_FD_state  = Four_Directions_State.Directions.NONE;
        player_RPS_state = Rock_Paper_Scissors.Signs.NONE;
        line.origin      = transform.position;

        turn_controller = GetComponent <Turn_Script>();
    }
 public void TakeAction(int actionUsed)
 {
     actions -= actionUsed;
     if (turnScript == null)
     {
         turnScript = manager.GetComponent <Turn_Script>();
     }
     if (actions == 1)
     {
         pips[0].enabled = false;
         turnScript.DelayedCheckActions();
     }
     else if (actions <= 0)
     {
         actions         = 0;
         pips[0].enabled = false;
         pips[1].enabled = false;
         turnScript.DelayedCheckActions();
     }
 }