Пример #1
0
        protected override void OnRemoveMechanism(MechanismComponent mechanism)
        {
            base.OnRemoveMechanism(mechanism);

            _mechanismContainer.Remove(mechanism.Owner);
            mechanism.Owner.RandomOffset(0.25f);
        }
Пример #2
0
        protected override void OnAddMechanism(MechanismComponent mechanism)
        {
            base.OnAddMechanism(mechanism);

            _mechanismContainer.Insert(mechanism.Owner);
        }
Пример #3
0
 public override bool CanAddMechanism(MechanismComponent mechanism)
 {
     return(base.CanAddMechanism(mechanism) &&
            _mechanismContainer.CanInsert(mechanism.Owner));
 }