Example #1
0
        public void SpawnOre(OreState state)
        {
            var gameObject = Instantiate(orePrefab, new Vector2(state.x, state.y), Quaternion.identity, universeParent.transform);

            gameObject.name = state.name;
            Ore o = gameObject.GetComponent <Ore>();

            o.oreState = state;
        }
Example #2
0
        void Awake()
        {
            if (type == SelectableType.Blackhole)
            {
            }
            if (type == SelectableType.Planet)
            {
                planet = GetComponent <Planet>();
            }
            if (type == SelectableType.Ore)
            {
                ore = GetComponent <Ore>();
            }
            if (type == SelectableType.Ship)
            {
            }

            Leave();
        }