void OnTriggerStay(Collider c) { // System is responsible for removing characters if (characterInside == null) { characterInside = c.gameObject.GetComponent <HitCollision>(); } }
void Start() { health = GetComponent <PlayerHealth>(); controller = GetComponent <PlayerController>(); animator = GetComponent <Animator>(); hash = GetComponent <HashIDs>(); hitcollision = GetComponent <HitCollision>(); manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent <GameManager>(); stocks = GetComponent <Stocks>(); }
private List <GameObject> GetHeadCollisionComponent(GameObject _objHitHead) { if (Object.op_Equality((Object)_objHitHead, (Object)null)) { return((List <GameObject>)null); } HitCollision componentInChildren = (HitCollision)_objHitHead.GetComponentInChildren <HitCollision>(); if (Object.op_Equality((Object)componentInChildren, (Object)null)) { return((List <GameObject>)null); } return(componentInChildren.lstObj.Count == 0 ? (List <GameObject>)null : componentInChildren.lstObj); }
public bool Init(ChaControl _female, GameObject _objHitHead, GameObject _objHitBody) { this.Release(); this.chaFemale = _female; List <GameObject> collisionComponent = this.GetHeadCollisionComponent(_objHitHead); if (collisionComponent != null) { this.lstObj.AddRange((IEnumerable <GameObject>)collisionComponent); } else { this.lstObj.Add((GameObject)null); } if (Object.op_Implicit((Object)_objHitBody)) { HitCollision componentInChildren = (HitCollision)_objHitBody.GetComponentInChildren <HitCollision>(); if (Object.op_Implicit((Object)componentInChildren)) { this.lstObj.AddRange((IEnumerable <GameObject>)componentInChildren.lstObj); } } return(true); }