예제 #1
0
 private void Awake()
 {
     instance      = this;
     this.m_name   = "$op_munin_name";
     this.m_talker = this.gameObject;
     currentChoice = choice[index];
     m_animator    = this.GetComponentInChildren <Animator>();
 }
예제 #2
0
        private static void InitMunin()
        {
            var go = Instantiate(RavenPrefab, Root.transform);

            DestroyImmediate(go.transform.Find("exclamation").gameObject);
            DestroyImmediate(go.transform.GetComponentInChildren <Light>());
            DestroyImmediate(go.GetComponent <Raven>());

            m_odinMunin = go.AddComponent <OdinMunin>();

            //var ani = go.GetComponentInChildren<Animator>();
            //DestroyImmediate(ani);

            go.transform.localPosition = new Vector3(2.7f, 0, 1.6f);
        }
        public static bool CanFinish(string item)
        {
            var    inv   = Player.m_localPlayer.GetInventory();
            int    count = OdinData.Data.SearchTaskList[item];
            string iname = Tweakers.GetItemData(item).m_shared.m_name;

            Debug.LogWarning(count);
            if (inv.CountItems(iname) >= count)
            {
                inv.RemoveItem(iname, count);
                var quest = QuestManager.instance.MyQuests[item];
                quest.Finish();
                OdinMunin.Reward(quest.Key, quest.Level);
                return(true);
            }
            return(false);
        }
예제 #4
0
 private void OnDestroy()
 {
     instance = null;
 }