public Unit(string name, UnitTypes unitType, Faction side, IMovementBehavior movementBehavior, IAttackBehavior attackBehavior, ITargetBehavior targetBehavior) { _name = name; _experience = 50; _resources = 50; _side = side; _unitType = unitType; _movementBehavior = movementBehavior; _movementBehavior.Owner = this; _attackBehavior = attackBehavior; _attackBehavior.Owner = this; _targetBehavior = targetBehavior; _targetBehavior.Owner = this; _unitView = new UnitView(this, unitType); }
internal TargetHandler(ITargetBehavior target, WeakReference <MixedRealityExtensionApp> appRef, IActor attachedActor) : base(target, appRef, attachedActor) { RegisterActionHandler(target.Target, nameof(target.Target)); RegisterActionHandler(target.Grab, nameof(target.Grab)); }