Пример #1
0
 public override void Init()
 {
     gameObject.layer = layer;
     thruster         = GetComponent <Thruster>();
     thruster.SetThrustV(1f);// Go forward
     _RadarSystem = GameObject.Find("RadarSystem").GetComponent <RadarSystem>();
     _RadarSystem.AddRadarBlip(gameObject, radarColor, 0.5f);
     InitWeapons();
     bounty = Random.Range(bountyLow, bountyHigh);
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     if (_radarSystem == null)
     {
         Debug.Log("Please add the RadarSystem Script to this Object");
     }
     else
     {
         //Add Self to RadarSystem
         _radarSystem.AddRadarBlip(this.gameObject, Color.green, 1.0f);
     }
 }
Пример #3
0
    void Start()
    {
        if (cubesOn)
        {
            for (int i = 1; i < _numCubes; i++)
            {
                GameObject cuboid = Instantiate(_cubes) as GameObject;
                cuboid.transform.position    = Random.insideUnitSphere * _cubesSpawnRadius;
                cuboid.transform.eulerAngles = new Vector3(Random.Range(0, 90), Random.Range(0, 90), Random.Range(0, 90));
                cuboid.transform.parent      = Parent.transform;

                // Attach this object to the Radar list - Specifies Object, Color and Size
                _RadarSystem.AddRadarBlip(cuboid, Color.red, 0.5f);
            }
        }
    }
Пример #4
0
 void Start()
 {
     _RadarSystem.AddRadarBlip(this.gameObject, Color.red, 0.5f);
 }