Exemple #1
0
    public void ResetCameraToBase(float time, int steps)
    {
        Entity entity = EntitiesManager.FindEntity(entityToFollow);

        cameraEntity.DoMoveLerp(followDelta - entity.transform.position, time);
        cam.transform.rotation = baseRotation;
    }
Exemple #2
0
    public Entity FindEntity()
    {
        switch (targetType)
        {
        case ENTITY_TARGET_TYPE.ENTITY_ID:
            return(EntitiesManager.FindEntity(entityId));

        case ENTITY_TARGET_TYPE.ENTITY:
            return(entityGo);
        }

        return(null);
    }
Exemple #3
0
    void Start()
    {
        cameraEntity = GetComponent <Entity>();

        cam    = GetComponent <Camera>();
        height = 2f * cam.orthographicSize;
        width  = height * cam.aspect;
        //startPosition = transform.position;

        if (cameraEntity != null)
        {
            cameraEntity.FollowLock(EntitiesManager.FindEntity(entityToFollow).gameObject);
            cameraEntity.CopyMovementValues(EntitiesManager.FindEntity(entityToFollow));
            //cameraEntity.acceleration *= 3f;
            //cameraEntity.friction *= 2f;
            //cameraEntity.turnFriction *= 2f;
        }
    }