예제 #1
0
    private void Start()
    {
        sw            = System.Diagnostics.Stopwatch.StartNew();
        previousLevel = 0;
        speed         = initialSpeed;
        runSpeed      = initialRunSpeed;
        dir           = DirectionEnum.Bottom;
        spriteManager.init(gameObject.GetComponent <SpriteRenderer>(), dir);
        spriteManager.changeLycanthropieLevel(0);
        bloodLustComponent   = gameObject.GetComponent <BloodLust>();
        lycanthropyComponent = gameObject.GetComponent <Lycanthropy>();
        combatComponent      = gameObject.GetComponent <CombatComponent>();
        rb = gameObject.GetComponent <Rigidbody2D>();
        lycanthropyComponent.startGame(bloodLustComponent);
        bloodLustComponent.startGame();
        Utils.Init();

        cam        = FindObjectOfType <Cinemachine.CinemachineVirtualCamera>();
        cam.Follow = transform;
        FindObjectOfType <Cinemachine.CinemachineConfiner>().m_BoundingShape2D = confinedCollider;
    }
예제 #2
0
 public void startGame(BloodLust bloodLustComponent)
 {
     LycanthropyPercent      = 0f;
     this.bloodLustComponent = bloodLustComponent;
     UpdateSlider();
 }