Exemple #1
0
    void Awake()
    {
        if (Explosion == null)
        {
            LoadResources();
        }
        ArmorText = gameObject.AddComponent <Text> ();
//		BuildDate = ClockStatic.clock.GetDate ();
        SetupArmor(4 * (int)BaseType, 2 * (int)BaseType, 2.5f);
        //c = FactionMatrix.FactionColors [(int)faction];
        ShipName  = NameManager.AssignName(this);
        shipClass = gameObject.GetComponent <ShipClass> ();
        if (shipClass == null)
        {
            shipClass = gameObject.AddComponent <ShipClass> ();
        }
        stand   = new GameObject();
        standlr = stand.AddComponent <LineRenderer> ();
        stand.transform.position = new Vector3(this.transform.position.x, 0f, transform.position.z);
        stand.transform.parent   = transform;
        SetupStand(c);

        if (ShipUI)
        {
//			UIDate.text = BuildDate;
            UIName.text   = ShipName;
            ShipUI.active = false;
        }
    }