예제 #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));
 }