コード例 #1
0
ファイル: AiController.cs プロジェクト: paynterc/convoy
 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
ファイル: PlayerObject.cs プロジェクト: paynterc/convoy
 // 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);
 }