Example #1
0
        public void makeUnit(Actor p, HexLoc loc)
        {
            Unit u = new GameObject("Unit").AddComponent <Unit> ();

            u.init(p, this, map [loc]);

            units.Add(u);
            UnityEngine.Debug.Log("Added Unit at " + loc.ToString());
        }
Example #2
0
        public void makeHex(HexLoc l)
        {
            var obj = new GameObject(l.ToString());

            obj.transform.parent = hFolder.transform;

            Hex h = obj.AddComponent <Hex>();

            h.init(this, l);
            map.Add(l, h);
        }
Example #3
0
        public Hex addHex(HexLoc hl)
        {
            Hex h = new GameObject("Hex " + hl.ToString()).AddComponent <Hex> ();

            h.init(this, hl);

            h.transform.parent = hexes.transform;

            map.Add(hl, h);
            return(h);
        }
Example #4
0
        public void makeMiasma(HexLoc loc, int aggression)
        {
            if (map [loc].miasma != null)
            {
                return;
            }

            Miasma m = new GameObject("Miasma").AddComponent <Miasma> ();

            m.init(this, map [loc], aggression);

            UnityEngine.Debug.Log("Added Miasma at " + loc.ToString());
        }