Пример #1
0
    private Vector3 AcquireRandomBoardTarget(out bool offscreen)
    {
        offscreen = false;
        if (UnityEngine.Random.Range(1, 100) < 5)
        {
            offscreen = true;
        }
        List <HitBonesType> list = new List <HitBonesType>();

        if (offscreen)
        {
            foreach (HitBonesType type in this.m_HitBones)
            {
                if (((((type.Direction != HIT_DIRECTIONS.E) && (type.Direction != HIT_DIRECTIONS.NE)) && ((type.Direction != HIT_DIRECTIONS.NW) && (type.Direction != HIT_DIRECTIONS.SE))) && (type.Direction != HIT_DIRECTIONS.SW)) && (type.Direction != this.m_PreviousHitBone.Direction))
                {
                    list.Add(type);
                }
            }
        }
        else
        {
            foreach (HitBonesType type2 in this.m_HitBones)
            {
                if (((((type2.Direction != HIT_DIRECTIONS.E_OFFSCREEN) && (type2.Direction != HIT_DIRECTIONS.N_OFFSCREEN)) && (type2.Direction != HIT_DIRECTIONS.S_OFFSCREEN)) && (type2.Direction != HIT_DIRECTIONS.W_OFFSCREEN)) && (type2.Direction != this.m_PreviousHitBone.Direction))
                {
                    list.Add(type2);
                }
            }
        }
        int num = UnityEngine.Random.Range(0, list.Count);

        this.m_PreviousHitBone = list[num];
        return(list[num].GetPosition());
    }
Пример #2
0
 protected override void Awake()
 {
     base.Awake();
     Log.Kyle.Print("Awake()", new object[0]);
     this.m_BladeRoot.SetActive(false);
     this.m_PreviousHitBone = this.m_HitBones[this.m_HitBones.Count - 1];
     this.m_OrgBladeScale   = this.m_BladeRoot.transform.localScale;
     this.m_BladeRoot.transform.localScale = Vector3.zero;
 }