Beispiel #1
0
    public void OnSceneGUI()
    {
        DeadzoneCamera cam = target as DeadzoneCamera;

        Vector3[] vert =
        {
            cam.transform.position + new Vector3(cam.deadzone.xMin, cam.deadzone.yMin, 0),
            cam.transform.position + new Vector3(cam.deadzone.xMax, cam.deadzone.yMin, 0),
            cam.transform.position + new Vector3(cam.deadzone.xMax, cam.deadzone.yMax, 0),
            cam.transform.position + new Vector3(cam.deadzone.xMin, cam.deadzone.yMax, 0)
        };

        Color transp = new Color(0, 0, 0, 0);

        Handles.DrawSolidRectangleWithOutline(vert, transp, Color.red);

        for (int i = 0; i < cam.limits.Count; ++i)
        {
            Vector3[] vertLimit =
            {
                new Vector3(cam.limits[i].xMin, cam.limits[i].yMin, 0),
                new Vector3(cam.limits[i].xMax, cam.limits[i].yMin, 0),
                new Vector3(cam.limits[i].xMax, cam.limits[i].yMax, 0),
                new Vector3(cam.limits[i].xMin, cam.limits[i].yMax, 0)
            };

            Handles.DrawSolidRectangleWithOutline(vertLimit, transp, Color.green);
        }
    }
Beispiel #2
0
 void Awake()
 {
     if (Instance != null)
     {
         return;
     }
     Instance = this;
 }
    // Use this for initialization
    void Awake()
    {
        zipIndicatorSpriteRenderer = zipIndicator.GetComponent <SpriteRenderer>();
        animator = GetComponent <Animator>();

        zipCharge       = maxZipCharge;
        deadZoneCam     = _camera.GetComponent <DeadzoneCamera>();
        lightningScript = LightningObject.GetComponent <LightningBoltScript> ();

        gameOverScreen = gameOverScreenObject.GetComponent <GameOverPanel> ();

        alter1 = alter1Object.GetComponent <Alter>();
        alter2 = alter2Object.GetComponent <Alter>();
        alter3 = alter3Object.GetComponent <Alter>();
    }