コード例 #1
0
ファイル: MenuHandler.cs プロジェクト: stevengunneweg/orbital
 public void BuySatellite()
 {
     if (OnBuySattelite != null)
     {
         var satelite = SateliteFactory.From(gameManager.lastSatelliteChoice.satelliteType);
         OnBuySattelite(satelite.gameObject);
     }
 }
コード例 #2
0
ファイル: AIManager.cs プロジェクト: stevengunneweg/orbital
    void SpawnSatallite()
    {
        const int      enemyTeamId    = 2;
        var            satellite      = SateliteFactory.From(SateliteFactory.SatelliteType.Attack, enemyTeamId);
        GameObject     go             = satellite.gameObject;
        Vector3        startPosition  = Quaternion.Euler(0, 0, (Random.value * 360)) * (Vector3.up * 2.85f);
        Vector3        endPosition    = startPosition + (startPosition.normalized * (0.3f + Random.value * 4));
        List <Vector3> trajectoryList = new List <Vector3>();

        trajectoryList.Add(startPosition);
        trajectoryList.Add(endPosition);
        go.GetComponent <Satelite>().Spawn(trajectoryList);
    }