Ejemplo n.º 1
0
 public void saveLaunchersInfo(int levelNum, LaunchersInfo _launchersinfo)
 {
     if (launchersinfomap.ContainsKey(levelNum))
     {
         launchersinfomap [levelNum] = _launchersinfo;
     }
     else
     {
         launchersinfomap.Add(levelNum, _launchersinfo);
     }
 }
Ejemplo n.º 2
0
    void save_launchers_info()
    {
        GameObject[]   launchers = GameObject.FindGameObjectsWithTag("Launcher");
        int            amount    = launchers.Length;
        List <Vector3> positions = new List <Vector3> ();
        List <float>   zRs       = new List <float> ();

        foreach (GameObject launcher in launchers)
        {
            positions.Add(launcher.transform.position);
            zRs.Add(launcher.transform.rotation.eulerAngles.z);
        }
        LaunchersInfo li = new LaunchersInfo(amount, positions, zRs, bulletPoses);

        GameData.gd.saveLaunchersInfo(LevelNum, li);
    }