public Duck(string name, IFlyBehavior flyBehavior, IQuackBehavior quackBehavior, IWalkBehavior walkBehavior) { Name = name ?? throw new ArgumentNullException(nameof(name)); m_FlyBehavior = flyBehavior ?? throw new ArgumentNullException(nameof(flyBehavior)); m_QuackBehavior = quackBehavior ?? throw new ArgumentNullException(nameof(quackBehavior)); m_WalkBehavior = walkBehavior ?? throw new ArgumentNullException(nameof(walkBehavior)); }
public override void Init(IEntity entity) { base.Init(entity); _follower = entity; _walk = entity.GetComponent <IWalkBehavior>(); _hasRoom = entity.GetComponent <IHasRoom> (); _obj = entity.GetComponent <ITranslateComponent> (); }
public override void Init (IEntity entity) { base.Init (entity); _follower = entity; _walk = entity.GetComponent<IWalkBehavior>(); _hasRoom = entity.GetComponent<IHasRoom> (); _obj = entity.GetComponent<ITranslateComponent> (); }
public Duck(string name, IWalkBehavior wb, IFlyBehavior fb) { this.name = name; this.walkBehavior = wb; this.flyBehvaior = fb; }
public WildDuck(IWalkBehavior b) { this._walkbehavior = b; }
public void SetWalkBehavior(IWalkBehavior walkBehavior) { m_WalkBehavior = walkBehavior; }
public override void Init(IEntity entity) { base.Init(entity); _faceDirection = entity.GetComponent<IFaceDirectionBehavior>(); _walk = entity.GetComponent<IWalkBehavior>(); }
public override void Init(IEntity entity) { base.Init(entity); _faceDirection = entity.GetComponent <IFaceDirectionBehavior>(); _walk = entity.GetComponent <IWalkBehavior>(); }
public Bird(string name, IFlyBehavior flyBehavior, IWalkBehavior walkBehavior) { Name = name; FlyBehavior = flyBehavior; WalkBehavior = walkBehavior; }