Пример #1
0
    /// <summary>
    /// 던질 정보 초기화
    /// </summary>
    /// <param name="newType">던질 아이템 타입</param>
    public void SetThrowInfo(ThrowItemType newType)
    {
        throwItemType = newType;

        // 던질 아이템 타입에 따른 이미지 색상 및 넓이 초기화
        //switch (newType)
        //{
        //    case ThrowItemType.GRENADE:
        //        throwRange.color = GRANADE_COLOR;
        //        throwRange.rectTransform.sizeDelta = new Vector2(GRANADE_LENGTH, GRANADE_LENGTH);
        //        break;
        //    case ThrowItemType.HEALPACK:
        //        throwRange.color = HEAL_PACK_COLOR;
        //        throwRange.rectTransform.sizeDelta = new Vector2(HEAL_PACK_LENGTH, HEAL_PACK_LENGTH);
        //        break;
        //}
    }
Пример #2
0
 public static ThrowItemView Spawn(this ThrowItemType type, Vector2 pos)
 {
     return(ThrowItemPool.Instance.Spawn(type, pos));
 }