void Awake()
    {
        entity = GetComponent <Game.Combat.Actor>();
        entity.SetDamageAdjuster(AdjustDamage);

        ragdollController = GetComponent <DynamicRagdoll.RagdollController>();

        Animator animator = ragdollController != null?ragdollController.ragdoll.GetComponent <Animator>() : GetComponent <Animator>();

        InitializeBoneReferences(animator);
        InitializeBoneActorElements(animator);

        // InitializeBehavior();
    }
예제 #2
0
 public void SetController(RagdollController controller)
 {
     this.controller = controller;
 }
 void OnEnable()
 {
     controller = target as RagdollController;
     CheckForProfileChange();
 }
예제 #4
0
 public void InitializeRagdollOnCollisions(RagdollController ragdollController)
 {
     this.ragdollController = ragdollController;
     //subscribe to receive a callback on ragdoll bone collision
     ragdollController.ragdoll.onCollisionEnter += OnRagdollCollisionEnter;
 }
 void OnEnable()
 {
     controller = target as RagdollController;
 }