public void Align() { var ent = EntityManager.GetEntiy <GameObject>(EntID); var postionCom = ent.GetComponent <IPostionComponet>(PostionAlais); var bellowPosCom = ent.GetComponent <IHaveHitBoxCom>(BelowHitboxAlias).HitBox; var newPos = postionCom.GetPostion(); newPos.Y = bellowPosCom.Bottom; newPos = Margin.Apply(newPos); postionCom.SetPostion(newPos); }
public void Action() { var ent = EntityManager.GetEntiy <GameObject>(EntID); var postionCom = ent.GetComponent <IPostionComponet>(PostionAlais); var bounds = ent.GetComponent <IHaveHitBoxCom>(ToAlignLeftOf).HitBox; var newPos = postionCom.GetPostion(); newPos.X = bounds.Right; Margin.Apply(newPos); postionCom.SetPostion(newPos); }