Пример #1
0
    // Use this for initialization
    void Start()
    {
        AttackList = new List<GameObject>();
        GUI = GameObject.Find("GUI").GetComponent<GUIScript>();
        hitableEnemies = new List<GameObject>();
          //  Time.timeScale = 0.5f;
        LstSquQuadRegr solvr = new LstSquQuadRegr();
        solvr.AddPoints(0, 0);
        solvr.AddPoints(MaxCharge, 1);
        solvr.AddPoints(2 * MaxCharge, 0);
        a = (float)solvr.aTerm();
        b = (float)solvr.bTerm();
        c = (float)solvr.cTerm();

        print("a: " + a + ", b: " + b + ", c: " + c);
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        if (ObstacleController.PLAYER != null)
        {
            hm = ObstacleController.PLAYER.GetComponent<HeroMovement>();
            anim = ObstacleController.PLAYER.GetComponent<Animator>();
            anim.SetInteger("AttackState", 0);
            anim.SetLayerWeight(1, 1);
            anim.SetLayerWeight(2, 1);
            anim.SetLayerWeight(3, 1);
        }
        attackAnimCountdown = 0f;
        AttackList = new List<GameObject>();
        GUI = Camera.mainCamera.GetComponent<GUIScript>();
        hitableEnemies = new List<GameObject>();
        //  Time.timeScale = 0.5f;
        LstSquQuadRegr solvr = new LstSquQuadRegr();
        solvr.AddPoints(0, 0);
        solvr.AddPoints(MaxCharge / 2, 1);
        solvr.AddPoints(MaxCharge, 0);
        a = (float)solvr.aTerm();
        b = (float)solvr.bTerm();
        c = (float)solvr.cTerm();

        //print("a: " + a + ", b: " + b + ", c: " + c);
    }