Inheritance: MonoBehaviour
Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        enemy_current_health = enemy_max_health;

        player_stats = FindObjectOfType <Player_stats>();

        the_QM = FindObjectOfType <Quest_manager>();
    }
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.layer == 8 /*Player*/)//if multiplayer added need fix
     {
         player_stats    = col.gameObject.GetComponent <Player_stats>();
         player_in_range = true;
     }
 }
Esempio n. 3
0
    // Start is called before the first frame update
    void Start()
    {
        player_health = FindObjectOfType <Player_health>();
        player_stats  = FindObjectOfType <Player_stats>();

        player_health.Restart();
        player_stats.Restart();
    }
 void Start()
 {
     skills_remaining              = Enum.GetValues(typeof(Skills)).Cast <Skills>().ToList();
     player_attack                 = gameObject.GetComponent <Player_attack>();
     player_stats                  = gameObject.GetComponent <Player_stats>();
     player_stats.LevelUpCallback += SelectSkill;
     buttons = skill_select_canvas.GetComponentsInChildren <Button>().ToList();
     skill_select_canvas.SetActive(false);
 }
Esempio n. 5
0
    void Start()
    {
        controller        = new Leap.Controller();
        playerStatsScript = transform.GetComponent <Player_stats>();

        curFrame   = controller.Frame();
        canPush    = false;
        curTimer   = 0;
        resetTimer = 1;
    }
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.layer == 8 /*Player*/)//if multiplayer added need fix
     {
         player_stats    = col.gameObject.GetComponent <Player_stats>();
         player_in_range = true;
         if (!exploding)
         {
             exploding = true;
             StartCoroutine(explodeDelay());
         }
     }
 }
 void Start()
 {
     Time.timeScale = 1f;
     _timer         = speedSpawn;
     playerStats    = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_stats>();
     if (DataHolder.Prefab != null)
     {
         Lvls_data data = DataHolder.Prefab;
         doge_count_to_win         = data.doge_count_to_win;
         doge_count_lost_to_losing = data.doge_count_lost_to_losing;
         speedSpawn       = data.speedSpawn;
         maxAsteroidSpeed = data.maxAsteroidSpeed;
     }
 }
Esempio n. 8
0
    void OnCollisionEnter(Collision c)
    {
        GameObject other = c.gameObject;

        if (other.tag == "Player")
        {
            Player_stats p = other.GetComponent <Player_stats> ();
            if (state == "follow")
            {
                p.playerDamage(damage);
                flee();
                //be.stunMult = 1f;
            }
        }
    }
Esempio n. 9
0
    private void Start()
    {
        baseCarDamage = carDamage;
        baseDaze      = dazedLength;

        ps = FindObjectOfType <Player_stats>();

        stat_manager = GameObject.Find("StatManager").GetComponent <Stat_Manager>();
        difficulty   = stat_manager.GetDifficulty();
        StartDifficulty(difficulty); // will make enemies harder as player progresses through the game
        dda = GameObject.Find("DDA").GetComponent <DynamicDifficultyAdjuster>();
        dda.Subscribe(this);

        icon = GameObject.Find("GameUI").transform.Find("DownSpeedIcon").gameObject;
    }
Esempio n. 10
0
    // Start is called before the first frame update
    void Start()
    {
        if (!UI_Exist)
        {
            UI_Exist = true;
            DontDestroyOnLoad(transform.gameObject);
            player_health = FindObjectOfType <Player_health>();
        }
        else
        {
            Destroy(gameObject);
        }

        player_stats = GetComponent <Player_stats>();
    }
Esempio n. 11
0
    // Start is called before the first frame update
    void Start()
    {
        the_player_stats  = FindObjectOfType <Player_stats>();
        the_player_health = FindObjectOfType <Player_health>();

        //start indexing everything
        //set everything to zero

        for (int i = 0; i < items.Length; i++)
        {
            switch (items[i].item_name)
            {
            case "sword":
                sword_index       = i;
                items[i].quantity = 0;
                break;

            case "shield":
                shield_index      = i;
                items[i].quantity = 0;

                break;

            case "health_potion":
                health_potion_index = i;
                items[i].quantity   = 0;

                break;

            case "berry":
                berry_index       = i;
                items[i].quantity = 0;

                break;

            case "mana_potion":
                mana_potion_index = i;
                items[i].quantity = 0;

                break;
            }
        }
    }
Esempio n. 12
0
 void Start()
 {
     initSpawnTime     = (int)Time.timeSinceLevelLoad;
     playerstatsScript = target.GetComponent <Player_stats>();
     Destroy(gameObject, 20);
 }
Esempio n. 13
0
 // Start is called before the first frame update
 void Start()
 {
     stats  = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_stats>();
     hp     = stats.live;
     dCount = stats.GetDogeCount();
 }
Esempio n. 14
0
 void Start()
 {
     guiscript    = GameObject.Find("GUIHANDLE").GetComponent <GUISCRIPTS>();
     player       = GameObject.FindGameObjectWithTag("Player").transform;
     player_stats = player.GetComponent <Player_stats>();
 }
Esempio n. 15
0
    void Start()
    {
        controller = new Leap.Controller();
        playerStatsScript = transform.GetComponent<Player_stats>();

        curFrame = controller.Frame ();
        canPush = false;
        curTimer = 0;
        resetTimer = 1;
    }
 protected override void Awake()
 {
     base.Awake();
     player      = gameObject;
     playerStats = this;
 }
Esempio n. 17
0
 // Start is called before the first frame update
 void Start()
 {
     the_player_stats = FindObjectOfType <Player_stats>();
 }
Esempio n. 18
0
 void Start()
 {
     initSpawnTime = (int)Time.timeSinceLevelLoad;
     playerstatsScript=target.GetComponent<Player_stats>();
     Destroy(gameObject, 20);
 }
Esempio n. 19
0
 void Start()
 {
     guiscript = GameObject.Find ("GUIHANDLE").GetComponent<GUISCRIPTS>();
     player = GameObject.FindGameObjectWithTag("Player").transform;
     player_stats = player.GetComponent<Player_stats>();
 }
 // Start is called before the first frame update
 void Start()
 {
     Physics.IgnoreLayerCollision(12 /*Bullets*/, 12 /*Bullets*/, true);
     mainCam      = Camera.main;
     player_stats = gameObject.GetComponent <Player_stats>();
 }