Ejemplo n.º 1
0
 public void SetGraphics(UnitGraphics graphics)
 {
     this.graphics = graphics;
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     UnitInformation info = this.gameObject.GetComponent<UnitInformation>();
     entity = info.Entity;
     graphics = info.Graphics;
     direction = new Vector(entity.PositionAs<TilePosition>().Point, new Point(0, 0)).Direction;
     //this.gameObject.renderer.material.color = info.ControllerInfo.FocusColor;
     entity.Register(new Trigger<ActionHandShakeInqueryEvent<MoveAction>>(evt => evt.Action.HandShakeRequired = true));
     entity.Register(new Trigger<ActionStartingEvent<MoveAction>>(OnStartMoveAction));
     entity.Register(new Trigger<BeginMoveEvent>(OnUnitBeginMove));
     entity.Register(new Trigger<UnitTakesDamageEvent>(OnTakeDamage));
     entity.Register(new Trigger<ActionStartingEvent<MovePathAction>>(OnUnitBeginPathMove));
     entity.Register(new Trigger<ActionCompletedEvent<MovePathAction>>(OnUnitFinishPathMove));
     entity.Register(new Trigger<UnitDieEvent>(OnUnitDeath));
     this.HealthBar.GetComponent<HealthbarView>().SetHealthPct(this.entity.Module<HealthModule>().HealthPct);
     this.HealthBar.parent = this.transform;
     this.graphics.UseUnitAnimation(StandardUnitAnimations.Idle);
 }
Ejemplo n.º 3
0
 public void SetGraphics(UnitGraphics graphics)
 {
     this.graphics = graphics;
 }