public Tail(int x, int y, Entity follow) : base(x,y) { this.entityFollow = follow; if (follow == null) return; follow.E_Moved += H_FollowingEntityMoved; }
// FTP(For Testing Purpose) void UpdateTest() { if (Input.GetKeyDown (KeyCode.Space)) { var tailNew = new NWorld.NEntity.Tail(0,0,this.tailEnd); this.tailEnd = tailNew; this.world.AddEntity(tailNew); } }
// for testing purpose remove later void AwakeTest() { tailEnd = pManager.entity; }
public World AddEntity(NEntity.Entity entity) { entities.Add(entity); this.E_EntityAdded(this, entity); return(this); }
void H_FollowingEntityMoved(World world, Entity entity, int fromX, int fromY, int toX, int toY) { Move (world, fromX,fromY); }