Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        netman = GetComponent <NetworkManager>();
        netman.StartHost();
        achievements = AcheivementScript.Instance;

        roomsCleared = 0;

        cameraPts = new List <Vector3>();

        cameraPts.Add(new Vector3(13.5f, 6.5f, -12));
        cameraPts.Add(new Vector3(28f, 7, -12.5f));
        cameraPts.Add(new Vector3(4, -7, -12f));
        cameraPts.Add(new Vector3(24, -8, -15f));
        cameraPts.Add(new Vector3(0, 6.5f, -12));

        //start player in Room1
        currentRoom = Instantiate(rooms[0]);
        currentRoom.transform.GetChild(3).gameObject.SetActive(true);
        print("Spawning in Room1A");
        rand      = new System.Random();
        reSpawnPt = new Vector2(0, 1);


        //UI stuff
        totalScore = 0;
        SetScoreUI();
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (ach == null)
     {
         ach = AcheivementScript.Instance;
     }
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     HP           = GetComponent <HealthSystem>();
     rb           = GetComponent <Rigidbody2D>();
     manager      = ManagerScript.Instance;
     srender      = GetComponent <SpriteRenderer>();
     acheivements = AcheivementScript.Instance;
 }
Пример #4
0
 void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     _instance = this;
 }
Пример #5
0
 // Start is called before the first frame update
 void Start()
 {
     HP           = GetComponent <HealthSystem>();
     rb           = GetComponent <Rigidbody2D>();
     manager      = ManagerScript.Instance;
     srender      = GetComponent <SpriteRenderer>();
     acheivements = AcheivementScript.Instance;
     if (MultiplayerRunManager.Instance != null)
     {
         isLocal = MultiplayerRunManager.Instance.isLocalMultiplayerGame;
     }
 }
Пример #6
0
    // Start is called before the first frame update
    void Start()
    {
        anim = GetComponent <Animator>();
        rb   = GetComponent <Rigidbody2D>();
        rend = GetComponent <SpriteRenderer>();

        facingLeft = false;
        flexing    = false;
        canMove    = true;
        hi         = false;
        foot       = true;
        lastFoot   = Time.time;

        acheivements = AcheivementScript.Instance;
    }
Пример #7
0
 // Start is called before the first frame update
 void Start()
 {
     mvr = GetComponent <PlayerMovement>();
     if (!mvr)
     {
         lmvr = GetComponent <PlayerMovementLocal>();
     }
     slash = GetComponent <Slasher>();
     if (!slash)
     {
         lslash = GetComponent <SlasherLocal>();
     }
     colHand = GetComponent <CollisionHandler>();
     if (!colHand)
     {
         lcolHand = GetComponent <CollisionHandlerLocal>();
     }
     rb           = GetComponent <Rigidbody2D>();
     anim         = GetComponent <Animator>();
     achievements = AcheivementScript.Instance;
 }