コード例 #1
0
        public ActorData GetActorTableData(string p_name)
        {
            if (!m_ActorTableAllDataNameMap.ContainsKey(p_name))
            {
                return(null);
            }

            ActorData outdata = new ActorData(m_ActorTableAllDataNameMap[p_name]);

            return(outdata);
        }
コード例 #2
0
        public ActorData GetActorTableData(int p_idindex)
        {
            if (!m_ActorTableAllDataMap.ContainsKey(p_idindex))
            {
                return(null);
            }

            ActorData outdata = new ActorData(m_ActorTableAllDataMap[p_idindex]);

            return(outdata);
        }
コード例 #3
0
 public ActorData(ActorData p_clonedata)
 {
     ID = p_clonedata.ID;
     ActorDataNameEnum = p_clonedata.ActorDataNameEnum;
     Name             = p_clonedata.Name;
     FullName         = p_clonedata.FullName;
     Descript         = p_clonedata.Descript;
     ActorImgae       = p_clonedata.ActorImgae;
     HP               = p_clonedata.HP;
     Attack           = p_clonedata.Attack;
     Def              = p_clonedata.Def;
     MoveSpeed        = p_clonedata.MoveSpeed;
     AttackSpeed      = p_clonedata.AttackSpeed;
     ActorSpriteImage = p_clonedata.ActorSpriteImage;
 }
コード例 #4
0
        public void InitSettingData(int p_id, E_Camp p_camp)
        {
            ActorTableID = p_id;
            MyCamp       = p_camp;


            m_ActorData           = ActorTableData.GetI.GetActorTableData(ActorTableID);
            this.gameObject.layer = CalcManager.GetCampTypeTOLayerIndex(this);

            //m_AnimationCallFN.Clear();
            //m_AnimationCallFN.Add(E_AniCallType.Attack01, Attack1);
            //m_AnimationCallFN.Add(E_AniCallType.Attack01, Attack1);
            m_AnimationCallFNArray = new Action <E_AniCallType> [(int)E_AniCallType.Max];
            m_AnimationCallFNArray[(int)E_AniCallType.Attack01] = Attack1;
            m_AnimationCallFNArray[(int)E_AniCallType.Attack02] = Attack1;


            m_LinkAnimator = GetComponentInChildren <Animator>();

            AttackRange.InitCollisionDetating(this, AttackCollistionEnter);
            SerchingRange.InitCollisionDetating(this, SerchingCollsionEnter);

            ActorAniEventCom.SetAnimationCallBackFN(ActorAttackEventCallFN, ActorAttackAniEventCallFN);


            // 공격 정보 얻기
            AttackDataArray.Clear();
            AttackData tempattackdata = AttackTableData.GetI.GetAttackDataID(1000);

            AttackDataArray.Add(tempattackdata);


            SetDataSetting();

            m_ISInit = true;
        }
コード例 #5
0
        private void Awake()
        {
            ActorData data = ActorTableData.GetI.GetActorTableData(ActorIndex);

            ChildButtonImage.sprite = data.ActorSpriteImage;
        }
コード例 #6
0
        //public ActorData GetActorTableData( int p_idindex)
        //{
        //    return ActorTableAllDataList.Find( (data) => data.ID == p_idindex );
        //}



        public void Init()
        {
            //
            //ActorData tempactordata = new ActorData();
            //tempactordata.ID = 0;
            //tempactordata.Name = "나주인공";
            //tempactordata.Descript = "킹왕짱 주인공";
            //ActorTableAllDataList.Add(tempactordata);


            //tempactordata = new ActorData();
            //tempactordata.ID = 1;
            //tempactordata.Name = "비련의 주인공";
            //tempactordata.Descript = "1인자만 기억되는 비열한 세상을 비관한 등등";
            //ActorTableAllDataList.Add(tempactordata);


            ActorTableAllDataList.Clear();
            m_ActorTableAllDataMap.Clear();
            m_ActorTableAllDataNameMap.Clear();


            ActorData tempactordata = null;
            string    FolderName    = Application.dataPath + "/Resources";

            System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(FolderName);
            string tempstr             = "";

            foreach (System.IO.FileInfo File in di.GetFiles())
            {
                if (File.Extension.ToLower().CompareTo(".asset") == 0)
                {
                    tempstr = Path.GetFileNameWithoutExtension(File.Name);
                    //Debug.LogFormat("Load Asset File : {0}\n {1}", File.Name
                    //    , File.FullName
                    //    , tempstr
                    //    );

                    tempactordata = Resources.Load <ActorData>(tempstr);

                    if (tempactordata)
                    {
                        ActorTableAllDataList.Add(tempactordata);


                        if (!m_ActorTableAllDataMap.ContainsKey(tempactordata.ID))
                        {
                            m_ActorTableAllDataMap.Add(tempactordata.ID, tempactordata);
                        }
                        else
                        {
                            Debug.LogErrorFormat("중복되는 인덱스가 있음 : {0}, {1}", File.FullName, tempactordata.ID);
                        }

                        if (!m_ActorTableAllDataNameMap.ContainsKey(tempactordata.Name))
                        {
                            m_ActorTableAllDataNameMap.Add(tempactordata.Name, tempactordata);
                        }
                        else
                        {
                            Debug.LogErrorFormat("중복되는 이름이 있음 : {0}, {1}", File.FullName, tempactordata.ID);
                        }
                    }
                }
            }



            //tempactordata =  Resources.Load<ActorData>("ActorData01");
            //ActorTableAllDataList.Add(tempactordata);

            // 2번째 로드
        }