Exemplo n.º 1
0
    public void GenerateKnight()
    {
        resources.UpdateGold(resources.GetGold() - settings.knightCost);

        // TODO: determine if we can generate a unit per unit requirements
        // TODO: will need to generate the next knight up some where to not collider with previous knight, need some mechanism to detect if there are knights there, if so simply move along x axis 5 units or so
        // TODO: check how many units are allowed to generate
        // TODO: generate units per timer
        // TODO: have some sort of check if a structure is close by, let's not generate a unit there

        Vector3 startingWarriorPos = transform.position;

        startingWarriorPos.x += 10;

        GameObject GO = Instantiate(knight, startingWarriorPos, Quaternion.identity, this.transform);
    }
Exemplo n.º 2
0
    // P U B L I C   A P I //////////////////////////////////////////////////////////////////////////////

    public void Castle()
    {
        resources.UpdateGold(resources.GetGold() - settings.castleCost);
        Place(castle);
    }