public bool firstTurn = true;          //< Flag for ensuring the first turn is represented correctly after first clicking the next run button

    /*
     * Awake is called after the initialization of gameobjects prior to the start of the game. This is used as an Initialization function
     */
    private void Awake()
    {
        // Get initialization values and set this towers basic values
        initValues = FindObjectOfType <ManagerIndex>();

        turnTimer = FindObjectOfType <LeftTopBarController>();
    }
Ejemplo n.º 2
0
    public ManagerIndex initValues;                             //< The ManagerIndex with initialization values for a given tower

    /*
     * private void Update()
     * {
     *  if (GetComponent<DamPlacementLocation>().inUse)
     *  {
     *      if (locationInUse == false)
     *      {
     *          Invoke("SpawnSealion", 5f);
     *      }
     *  }
     *  //myObject.GetComponent<SealionSpawner>().SpawnSealion();
     *  //just here to save the code
     * }
     */

    /*
     * Awake is called after the initialization of gameobjects prior to the start of the game. This is used as an Initialization Function
     */
    private void Awake()
    {
        // Get initialization values and set this towers basic values
        initValues = FindObjectOfType <ManagerIndex>();
        GameEvents.onTurnUpdated.AddListener(SpawnSealion);
        damPlacementLocation = GetComponent <DamPlacementLocation>();
        turnsBeforeShowing   = initValues.initSets[initValues.setToUse].sealionAppearanceTime;
    }
Ejemplo n.º 3
0
    private bool transacting;           //< Is the purchase still being processed

    /*
     * Start is called prior to the first frame update
     */
    private void Start()
    {
        // Get initialization values and set this towers basic values
        initValues    = FindObjectOfType <ManagerIndex>();
        startingFunds = initValues.initSets[initValues.setToUse].startingMoney;
        bank          = startingFunds;
        UpdateText();
    }
Ejemplo n.º 4
0
    public int turnPlaced = 0;                               //< The turn this tower was placed in the level

    #region Major Monobehaviour Functions

    /**
     * Awake is called after initialization of gameobjects prior to the start of the game. Handle initialization tasks common to all towers
     */
    protected virtual void Awake()
    {
        // Get initialization values and set this towers basic values
        initValues = FindObjectOfType <ManagerIndex>();
        // Get the Tower Manager
        towerManager = FindObjectOfType <TowerManager>();
        // Get component references
        rangeEffect = GetComponent <TowerRangeEffect>();
    }
    /**
     * Start is called before the first frame update
     */
    void Start()
    {
        // Get initialization values and set this towers basic values
        initValues = FindObjectOfType <ManagerIndex>();

        numNestingSights = initValues.initSets[initValues.setToUse].nestingSites;

        // Subscribe to onEndRun event
        GameEvents.onEndRun.AddListener(Clear);
    }
Ejemplo n.º 6
0
 private void Awake()
 {
     if (!MI)
     {
         MI = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }