Beispiel #1
0
        public static STATUS_CODE LoadPrefab(ref GameObject a_prefab, AnimalType a_animalType)
        {
            STATUS_CODE status = STATUS_CODE.IS_GOOD;

            GameObject outObject = null;

            try
            {
                switch (a_animalType)
                {
                case AnimalType.CHICKEN:
                {
                    outObject = Resources.Load(_ChickenResourcePrefab, typeof(GameObject)) as GameObject;
                    break;
                }

                default:
                {
                    outObject = null;
                    status    = STATUS_CODE.BAD_ANIMAL;
                    break;
                }
                }
            }
            catch (System.Exception exc)
            {
                Debug.LogError(exc.ToString());
                status = STATUS_CODE.IS_BAD;
            }
            a_prefab = outObject;
            return(status);
        }
Beispiel #2
0
 public Response(T _data, string _message, STATUS_CODE _status)
 {
     Status  = _status;
     Data    = _data;
     Message = _message;
 }
Beispiel #3
0
 public Response(T _data, STATUS_CODE _status)
 {
     Status = _status;
     Data   = _data;
 }