Ejemplo n.º 1
0
 private void SynAddUnits()
 {
     while (adds.GetCount() > 0)
     {
         common.game.battle.engine.unit.Unit engineUnit = adds.take();
         int        unitCid        = engineUnit.Cid;
         string     modelprefabDir = "scenes/Boy@skin";
         GameObject modelprefab    = Resources.Load <GameObject>(modelprefabDir);
         common.game.battle.engine.Vector3 position = engineUnit.Position;
         GameObject model = GameObject.Instantiate(modelprefab, new Vector3(position.X, position.Y, position.Z), new Quaternion(0, 0, 0, 1));
         Unit       unit  = new Unit(engineUnit, model);
         units.Add(engineUnit.Id, unit);
         if (engineUnit.IsControl)
         {
             contrller = unit;
         }
     }
 }
Ejemplo n.º 2
0
 public void OnPositionChange(common.game.battle.engine.Vector3 position)
 {
     state.OnPositionChange(position);
 }
Ejemplo n.º 3
0
 public void OnPositionChange(common.game.battle.engine.Vector3 position)
 {
     this.position = new Vector3(position.X, position.Y, position.Z);
 }