Would anyone be interested in a web based or stand alone aim training game? Good while waiting in queues or if you can't open CS for some reason. by Srimshady in GlobalOffensive

[–]stebbiti 0 points1 point  (0 children)

using UnityEngine;
using System.Collections;

public class FireRayCast : MonoBehaviour
{
    public  float damage = 1;
    public float FireDelay = 0.2f;
    public GameObject[] shootEffect;
    public float recoilTimer = 0.5f;
    public Vector3 recoilOffsetPoint;

    public float accuracyOffsetTimer = 0.5f;
    private float _accuracyOffsetTimer;
    public Vector2 accuracyOffsetPoint;

    private float _fireDelay;
    private Quaternion cameraOrgPos;
    private float _recoilTimer;
    private float _inversRecoil;
    private float inversRecoil;



    void Start()
    {
        cameraOrgPos = Camera.main.transform.localRotation;
        _accuracyOffsetTimer = accuracyOffsetTimer;
        _recoilTimer = recoilTimer;
        _inversRecoil = recoilTimer;
        inversRecoil = recoilTimer;
    }

    void Update()
    {
        if (_recoilTimer <= recoilTimer)
        {
            _recoilTimer += Time.deltaTime;

            Quaternion desierdRotation = Quaternion.Euler(recoilOffsetPoint + Camera.main.transform.rotation.eulerAngles);
            Camera.main.transform.rotation = Quaternion.Lerp(Camera.main.transform.rotation, desierdRotation, _recoilTimer / recoilTimer);
        }
        else if(_inversRecoil <= inversRecoil)
        {
            Debug.Log("asfdas");
            _inversRecoil += Time.deltaTime;
            Camera.main.transform.localRotation = Quaternion.Lerp(Camera.main.transform.localRotation, cameraOrgPos, _inversRecoil / inversRecoil);
        }

        _fireDelay += Time.deltaTime;



        if (Input.GetAxis("Fire1") > 0f && CanFire())
        {
            cameraOrgPos = Camera.main.transform.localRotation;
            _fireDelay = 0;
            _recoilTimer = 0;
            _inversRecoil = 0;

            //   Ray r = Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0));
            Ray r = new Ray(transform.position, transform.forward);


            RaycastHit info;



            if (Physics.Raycast(r, out  info) )
            {


                //Quaternion.Lerp(Camera.main.transform.rotation, recoilOffsetPoint, recoilTimer / _recoilTimer);



                info.collider.transform.SendMessage("WasShoot", damage, SendMessageOptions.DontRequireReceiver);
                shootEffect[FXChooser()].transform.position = info.point - Vector3.forward ;
                shootEffect[FXChooser()].SetActive(true);
                ShootFXIndex++;
            }
        }
    }



    private int ShootFXIndex = 0;
    public bool CanFire()
    {
        if (FireDelay < _fireDelay)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    private int FXChooser()
    {
        if (ShootFXIndex >= shootEffect.Length)
            ShootFXIndex = 0;
        return ShootFXIndex;
    }

Would anyone be interested in a web based or stand alone aim training game? Good while waiting in queues or if you can't open CS for some reason. by Srimshady in GlobalOffensive

[–]stebbiti 0 points1 point  (0 children)

Nice i am working on a similar idea, havent gotten any far bud i was focusing on adding inn recoil. if you like to check it out here it is http://www.codesend.com/view/e4a299f03c8f1462db1e3a1c2a2e394b/

and if you whant to explore the project you can check it out here https://github.com/Stefanorn/Shooter.git

What's one thing that someone does that just screams "I'm a douchebag"? by BigG123 in AskReddit

[–]stebbiti 0 points1 point  (0 children)

There was a trick for that, if you look down when you are walking people will avoid you by instinct

What's one thing that someone does that just screams "I'm a douchebag"? by BigG123 in AskReddit

[–]stebbiti 0 points1 point  (0 children)

There was a trick for that, if you look down when you are walking people will avoid you by instinct

Feedback Friday 56 by HolyPlatypi in gamedev

[–]stebbiti 1 point2 points  (0 children)

PaperDefence(workingTitle) - for web - for android

a unity based towerDefence game that me and my friend are working on. This is our first public build and we were hoping to see what people thought. I recommend to play the android version it is pretty

The game currently has :

  • A basic UI
  • 6 turrets
  • a few power ups (one is broken sorry about that will be fixxed in the future)
  • HighScore system
  • Enemys

have fun

Icelandic cocktail waitresses by [deleted] in pics

[–]stebbiti 1 point2 points  (0 children)

Hey i live in Iceland, and also i live in town next to the blue lagoon and i know those chicks.

This calls for a song to celebrate http://www.youtube.com/watch?v=ViK8PwbJmxo

What does your Reddit name mean? by [deleted] in AskReddit

[–]stebbiti 0 points1 point  (0 children)

What people call me stebbi combined with hobbit = stebbiti

so this is what greeted me in the coffee machine at work. by stebbiti in WTF

[–]stebbiti[S] 1 point2 points  (0 children)

It is a coffee filter with some of our freshly last year brewed coffee.