示例#1
0
 public override void BindEntity(BaseEntity e)
 {
     base.BindEntity(e);
     e.EntityView       = this;
     this.entity        = e as Entity;
     uiFloatBar         = FloatBarManager.CreateFloatBar(transform, this.entity.curHealth, this.entity.maxHealth);
     transform.position = this.entity.transform.Pos3.ToVector3();
 }
示例#2
0
 public override void BindEntity(BaseEntity e, BaseEntity oldEntity = null)
 {
     base.BindEntity(e, oldEntity);
     e.EntityView = this;
     this.entity  = e as Entity;
     if (oldEntity != null)
     {
         uiFloatBar = (oldEntity.EntityView as EntityView).uiFloatBar;
     }
     else
     {
         uiFloatBar = FloatBarManager.CreateFloatBar(transform, this.entity.curHealth, this.entity.maxHealth);
     }
 }