예제 #1
0
 void Awake()
 {
     mesh       = GetComponentInChildren <MeshRenderer>().gameObject;
     grid       = (GameObject.Find("HexGrid").GetComponent <HexGrid>());
     uiListener = GameObject.Find("Canvas").GetComponent <UIHoverListener>();
     UpdateCoordinates();
 }
예제 #2
0
파일: HexGrid.cs 프로젝트: mmielus/Stars
    void Awake()
    {
        cellCountX = ChunkCountX * HexMetrics.chunkSizeX;
        cellCountZ = ChunkCountZ * HexMetrics.chunkSizeZ;

        CreateChunks();
        CreateCells();

        uiListener = GameObject.Find("Canvas").GetComponent <UIHoverListener>();
    }
예제 #3
0
    private new void Awake()
    {
        base.Awake();
        RadarRange = basicRadarRange * 2 * HexMetrics.innerRadius + 0f;

        mesh       = GetComponentInChildren <MeshRenderer>().gameObject;
        grid       = (GameObject.Find("HexGrid").GetComponent <HexGrid>());
        uiListener = GameObject.Find("Canvas").GetComponent <UIHoverListener>();

        UpdateCoordinates();


        //FindStarsNear();
        Debug.Log("Awake planet " + name + ", coordinates: " + Coordinates + " - " + transform.position +
                  "Minerals " + resources.minerals + "HealthPoints " + characteristics.healthPoints);
    }
예제 #4
0
파일: Spaceship.cs 프로젝트: mmielus/Stars
    protected new void Awake()
    {
        base.Awake();
        model           = null;
        Flying          = false;
        MaxActionPoints = spaceshipStatistics.speed;
        basicRadarRange = spaceshipStatistics.radars;
        RadarRange      = basicRadarRange * 2 * HexMetrics.innerRadius + 0f;
        basicAttack     = 10;

        grid = (GameObject.Find("HexGrid").GetComponent <HexGrid>());
        UpdateCoordinates();
        uiListener   = GameObject.Find("Canvas").GetComponent <UIHoverListener>();
        burster      = gameObject.GetComponentsInChildren <ParticleSystem>().Last();
        bursterLight = gameObject.GetComponentInChildren <Light>();
        engineSound  = gameObject.GetComponent <AudioSource>();

        TurnEnginesOff();

        Debug.Log("Awake spaceship");
    }
예제 #5
0
 void Start()
 {
     instance = this;
 }