Ejemplo n.º 1
0
        private bool Init(Animator animator)
        {
            var character = animator.transform;

            if (!instances.ContainsKey(character))
            {
                color = character.GetComponent <ColorMove>();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        private void Init(GameObject character)
        {
            vItemManager itemManager = character.GetComponent <vItemManager>();

            if (itemManager == null)
            {
                Debug.Log("No item manager");
            }
            else
            {
                color = character.GetComponent <ColorMove>();

                foreach (var eqpPnt in itemManager.equipPoints)
                {
                    if (eqpPnt.equipPointName.Equals("RightArm"))
                    {
                        rifle = eqpPnt.equipmentReference.equipedObject.transform;
                        break;
                    }
                }
            }
        }