コード例 #1
0
 void OnTriggerStay(Collider c)
 {
     // System is responsible for removing characters
     if (characterInside == null)
     {
         characterInside = c.gameObject.GetComponent <HitCollision>();
     }
 }
コード例 #2
0
 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>();
 }
コード例 #3
0
    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);
    }
コード例 #4
0
    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);
    }