Exemple #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;
         }
     }
 }
Exemple #2
0
 public void OnPositionChange(common.game.battle.engine.Vector3 position)
 {
     state.OnPositionChange(position);
 }
Exemple #3
0
 public void OnPositionChange(common.game.battle.engine.Vector3 position)
 {
     this.position = new Vector3(position.X, position.Y, position.Z);
 }