Esempio n. 1
0
 protected void DestroyCircle()
 {
     CineCircleManager.RemoveNotifyFromList(gameObject);
     CineCircleManager.cineCamCount--;
     Destroy(cineCam);
     Destroy(gameObject);
 }
Esempio n. 2
0
 protected override void OnAttackFinish()
 {
     base.OnAttackFinish();
     timesAttacked++;
     brawlDistance = Random.Range(10, 20);
     brawlDelay    = Random.Range(1f, 3f);
     brawling      = true;
     SetState(State.BRAWL);
     if (Player.host != null)
     {
         CineCircleManager.NotifyCinematic(10f, CineCircle.ATTACK, gameObject, currentTarget);
     }
 }
Esempio n. 3
0
    //Set starting values of a new CineCam
    public void Init(RenderTexture texture, GameObject focal, float offset, CineCircleManager.CineEventValues values)
    {
        content              = transform.Find("Content").gameObject;
        arrow                = transform.Find("Arrow").gameObject;
        text                 = GetComponentInChildren <Text>();
        screenPos            = transform.localPosition;
        transform.localScale = Vector3.zero;
        var eventType = values.eventType;

        border   = GetComponent <RawImage>();
        arrowIMG = arrow.GetComponent <Image>();

        focalPoint = focal;
        zoom       = initialZoom = offset;
        cineCam    = Instantiate(cameraPrefab);
        cineCam.GetComponent <Camera>().targetTexture = texture;
        content.GetComponent <RawImage>().texture     = texture;
        cineCam.transform.SetParent(focal.transform);
        cineCam.transform.position = focalPoint.transform.position - new Vector3(0, -heightOffset, zoom);
        screenOffset = new Vector2(1, 0.2f) * (CineCircleManager.GetNotifyCount() - 1) * 120f;

        CineCircleManager.AddNotifyList(gameObject, values);

        if (eventType.name == "RAND")
        {
            SetBorderColor(colors[Random.Range(0, colors.Length)].name);
        }
        else
        {
            SetBorderColor(eventType.color.name);
        }

        text.text = eventType.name;
        var sample = eventType.color.color;

        text.color = sample;
    }
Esempio n. 4
0
 void Start()
 {
     self = this;
 }