Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     gotEnter = false;
     mycustomNetworkManager = GameObject.Find("networkController").GetComponent<customNetworkManager>();
 }
Esempio n. 2
0
    // Use this for initialization
    void Start()
    {
        mygametime = 100;

        myCanvas = GameObject.Find("Canvas");
        winPanel = myCanvas.transform.Find("win panel").gameObject;

        healthText = winPanel.transform.Find("health").gameObject.GetComponent<Text>();
        comboText = winPanel.transform.Find("combo").gameObject.GetComponent<Text>();
        countDownText = winPanel.transform.Find("countDown").GetComponent<Text>();

        mystar = new GameObject[3];
        for (int i = 0; i < mystar.Length; i++)
        {
            mystar[i] = winPanel.transform.Find("star achieve/star " + (i + 1).ToString()).gameObject;
        }

        mygameover = GameObject.Find("gameover");
        myStarting = GameObject.Find("starting");
        myTimeOut = GameObject.Find("timeout");
        waitForPlayer = GameObject.Find("waiting text");

        //myserverTime = GameObject.Find("time").GetComponent<serverTime>();
        CNM = GameObject.Find("networkController").GetComponent<customNetworkManager>();
        hasSpawn = false;

        isInUltimateServer = false;
          //  healthText.fontSize = Screen.width / 30;
          //  comboText.fontSize = Screen.width / 30;
    }
Esempio n. 3
0
    // Use this for initialization
    protected virtual void Awake()
    {
        mycustomNetworkManager = GameObject.Find("networkController").GetComponent<customNetworkManager>();

        currentHealth = startingHealth;
        currentMana = startingMana;

        playerArrow = transform.Find("arrow parent").gameObject;
        myblockController = transform.Find("block").GetComponent<blockController>();
        myUltiCamera = GameObject.FindGameObjectWithTag("ultimateCamera").GetComponent<ultimateCameraControllerNetwork>();

        mymelee = transform.Find("melee trigger box").GetComponent<meleeNetwork>();
        myaudio = GetComponent<AudioSource>();
        rb = GetComponent<Rigidbody>();

        isJumping = false;
        hasEnterGameOver = false;
        isAttack = false;
        isCastMode = false;
        playBlockAnimation = false;
        isLose = false;
        canMove = true;
        isWalking = false;
        isInResult = false;
        canCastUltimate = true;
        isPSActive = false;
        isPSArmor = false;
        isPSOTU = false;

        armorUICD = false;

         isNotEnoughMana = false;
        isKnockBack = true;
        isEndOfRangeAttack = true;

        isFinishCombo = true;

        isStun = false;
        isCrouch = false;
        canCombo = false;
        shouldWaitAnimationFinish = false;
        isBlocking = false;
        isDoubleTap = false;
        canRangeAttack = true;
        canMeleeAttack = true;

        speed = normalSpeed;
        jumpSpeed = lowJumpSpeed;
           // comboCount = 0;
        highestComboAchieve = 0;
        blockCount = maxBlockCount;
        stunRate = 1;//default
        spellCoolDownRate = 1;//how fast the spell cooldown, 1 is normal rate
        spellCoolDownRateNetwork = spellCoolDownRate;

        myserverLogic = GameObject.Find("server logic(Clone)").GetComponent<serverLogic>();

        coolDownRangeTimer = 0;
        myDamageMultipler = 1;

        coolDownMeleeTimer = new float[2];
        coolDownMeleeTimer[0] = coolDownMeleeAttackRate;

        isMeleeComboCount = new bool[3];
        for (int i = 0; i < isMeleeComboCount.Length; i++)
            isMeleeComboCount[i] = false;//for melee combo animation

        myblockTimer = coolDownBlockTimer;
        stunTimer = coolDownStunRate;

        //comboText = combo.GetComponent<Text>();
        //comboAnimation = combo.GetComponent<Animation>();

        spellComboArmor = new float[3];
        spellComboActive = new float[3];
        spellComboPassive = new float[3];
        for (int i = 0; i < spellComboArmor.Length; i++)
        {
            spellComboArmor[i] = 0;
            spellComboActive[i] = 0;
            spellComboPassive[i] = 0;
        }
        canCastSpell = new bool[3];
        for (int i = 0; i < canCastSpell.Length; i++)
            canCastSpell[i] = true;
    }
    // Use this for initialization
    void Start()
    {
        mytest = GameObject.Find("networkController").GetComponent<networktest>();
        mycustomNetworkManager = GameObject.Find("networkController").GetComponent<customNetworkManager>();
        mymage = mage.no_one;
        isSelect = false;
        isMoving = false;

        startingPos = new Vector3[3];
        for(int i=0;i<startingPos.Length;i++)
        {
            startingPos[i] = allCharacter[i].transform.position;
        }
    }