Ejemplo n.º 1
0
    public void InitializeNewGame()
    {
        //---<resourses init>---//

        //---<resourses init>---//

        //---<Ship init>---//
        AvailableShips.AddShip(_yellowShips, "Yellow");
        AvailableShips.AddShip(_bleuShips, "Blue");
        AvailableShips.AddShip(_greenShips, "Green");
        AvailableShips.AddShip(_minerShips, "Miner");
        //---<Ship init>---//
    }
Ejemplo n.º 2
0
    public void Resume()
    {
        string json = File.ReadAllText(Application.persistentDataPath + "/Save.gm");
        var    go   = JsonUtility.FromJson <PersistentData>(json);

        AvailableShips.AddShip(go.yellowShips, "Yellow");
        AvailableShips.AddShip(go.blueShips, "Blue");
        AvailableShips.AddShip(go.greenShips, "Green");
        AvailableShips.AddShip(go.minerShips, "Miner");
        Werehouses.AddResours(ResoursesType.Metal, go.metal);
        Werehouses.AddResours(ResoursesType.YellowGem, go.yellowGem);
        Werehouses.AddResours(ResoursesType.BlueGem, go.blueGem);
        Werehouses.AddResours(ResoursesType.GreenGem, go.greenGem);
        SceneManager.LoadScene("ArkBase");
    }
Ejemplo n.º 3
0
    private void Start()
    {
        //===============================//
        for (int i = 0; i < 6; i++)
        {
            AvailableShips.AddShip(1, UnitsType[Random.Range(0, 3)].WeaponType);
        }
        //===============================//

        AddAvailableShip(UnitsType[0], AvailableShips.YellowShips);
        AddAvailableShip(UnitsType[1], AvailableShips.BlueShips);
        AddAvailableShip(UnitsType[2], AvailableShips.GreenShips);

        Init();
    }
Ejemplo n.º 4
0
 private void FinishBuildingShip(GameObject client, string type)
 {
     RemoveShipFromConstruct(client);
     AvailableShips.AddShip(1, type);
 }