예제 #1
0
    public void StartLerp(Vector3 startPos, Vector3 targetPos, float speed)
    {
        StartPos  = startPos;
        TargetPos = targetPos;
        Speed     = speed;

        Distance  = Vector3.Distance(startPos, targetPos);
        StartTime = Time.time;

        conObject = GameMaster.getGameMaster().GetComponent <Controll>();

        conObject.startTeleporting(targetPos - startPos);

        Lerping = true;

        //ObjectPool.getObjectPool().getObject(ObjectPool.categorie.essential, (int)ObjectPool.essential.camera).GetComponent<justLook>().objectToLookAt = gameObject;

        gameObject.GetComponent <Player>().MeshRenderer.enabled = false;
        teleportationBall = ObjectPool.getObjectPool().getObject(ObjectPool.categorie.explosion, (int)ObjectPool.explosion.heroTeleportBall);
        lookedATarget     = false;
    }