Exemple #1
0
    // Use this for initialization
    void Start()
    {
        // Change this tag to Npc
        if (this.tag != "Npc")
        {
            this.tag = "Npc";
        }

        if (this.gameObject.layer != 13)
        {
            this.gameObject.layer = 13;
        }

        indexDialog = 0;

        playerControl = GameObject.FindGameObjectWithTag("Player").GetComponent <HeroController>();

        if (npcType == NpcType.QuestNpc)
        {
            questData = GameObject.Find("QuestData").GetComponent <Quest_Data>();
            //questWindow = GameObject.Find("GUI Manager/QuestWindow").GetComponent<QuestWindow>();
            player    = GameObject.FindGameObjectWithTag("Player");
            inventory = player.transform.Find("Inventory").GetComponent <GUI_Menu>();
        }
    }
 // Use this for initialization
 void Start()
 {
     layerActiveGround   = 11;
     layerActiveItem     = 10;
     layerActiveEnemy    = 9;
     destinationPosition = this.transform.position;
     animationManager    = this.GetComponent <AnimationManager>();
     playerSkill         = this.GetComponent <PlayerSkill>();
     playerStatus        = this.GetComponent <PlayerStatus>();
     controller          = this.GetComponent <CharacterController>();
     guiMenu             = GameObject.Find("Inventory").GetComponent <GUI_Menu>();
     flinchValue         = 100;
     delayAttack         = 100;
     defaultColor        = new Color[modelMesh.Count];
     DeadSpawnPoint      = GameObject.FindGameObjectWithTag("SpawnHero");
     SetDefualtColor();
 }