Exemple #1
0
 void OnBecameVisible()
 {
     if (_firstSeen)
     {
         Camera_Move.CloseLook(gameObject);
     }
     _firstSeen = false;
 }
 // Start is called before the first frame update
 void Start()
 {
     this.audiosource = GetComponent <AudioSource>();
     camera_move      = camera_brake.GetComponent <Camera_Move>();
 }
    //For editor Functions---------//
    public void SaveFrame(Cinematic_Type listType, int selected, Movement_Type type, float dur, bool isNew)
    {
        Camera_Move newStep = new Camera_Move();
        newStep.position = transform.position;
        newStep.rotation = transform.rotation;
        newStep.duration = dur;
        newStep.type = type;

        if (listType == Cinematic_Type.INTRO)
        {
            if (isNew)
            {
                stepsIntro.Add(newStep);
            }
            else
            {
                stepsIntro[selected] = newStep;
            }

        }
        else if (listType == Cinematic_Type.OUTRO)
        {
            if (isNew)
            {
                stepsOutro.Add(newStep);
            }
            else
            {
                stepsOutro[selected] = newStep;
            }
        }
    }