Exemplo n.º 1
0
 public void StopHauntPrep()
 {
     display          = null;
     this.state       = ActionState.FREE;
     Cursor.lockState = CursorLockMode.Locked;
     Cursor.visible   = false;
 }
Exemplo n.º 2
0
 public void DisplayHauntInfo(Haunt haunt)
 {
     display          = haunt;
     this.state       = ActionState.PAUSED;
     Cursor.lockState = CursorLockMode.None;
     Cursor.visible   = true;
 }
Exemplo n.º 3
0
        public Spectre(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu)
            : base(owner, abilitySleeper, orbwalkSleeper, menu)
        {
            this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> >
            {
                { AbilityId.spectre_spectral_dagger, x => this.dagger = new NukeAbility(x) },
                { AbilityId.spectre_reality, x => this.reality = new Reality(x) },
                { AbilityId.spectre_haunt, x => this.haunt = new Haunt(x) },
                { (AbilityId)7851, x => this.shadowStep = new TargetableAbility(x) },

                { AbilityId.item_phase_boots, x => this.phase = new SpeedBuffAbility(x) },
                { AbilityId.item_diffusal_blade, x => this.diffusal = new DebuffAbility(x) },
                { AbilityId.item_abyssal_blade, x => this.abyssal = new DisableAbility(x) },
                { AbilityId.item_manta, x => this.manta = new BuffAbility(x) },
                { AbilityId.item_spirit_vessel, x => this.vessel = new DebuffAbility(x) },
                { AbilityId.item_urn_of_shadows, x => this.urn = new DebuffAbility(x) },
                { AbilityId.item_black_king_bar, x => this.bkb = new ShieldAbility(x) },
                { AbilityId.item_sheepstick, x => this.hex = new DisableAbility(x) },
                { AbilityId.item_orchid, x => this.orchid = new DisableAbility(x) },
                { AbilityId.item_bloodthorn, x => this.bloodthorn = new Bloodthorn(x) },
                { AbilityId.item_nullifier, x => this.nullifier = new Nullifier(x) },
            };

            this.MoveComboAbilities.Add(AbilityId.spectre_spectral_dagger, x => this.daggerMove = new DaggerMove(x));
        }
Exemplo n.º 4
0
    private ACTOR_STATE CheckTileState()
    {
        processedState = ACTOR_STATE.NONE;
        switch (currentTile.effectsOnTile)
        {
        case Tile.TILE_EFFECTS.CHILL | Tile.TILE_EFFECTS.HAUNT:
        case Tile.TILE_EFFECTS.HAUNT:
            GameObject player = GameObject.FindGameObjectWithTag("Player");
            if (player)
            {
                Haunt h = player.GetComponent <Haunt>();
                moveDirection  = h.HauntActor(this);
                forceDirection = true;
                PlaySound(3, 0);
                gameObject.GetComponent <Animator>().Play("Run 01");
            }
            else
            {
                Debug.LogError("Found haunted tile but no player for getting the haunt direction");
            }
            processedState = ACTOR_STATE.HAUNTED;
            break;

        case Tile.TILE_EFFECTS.CHILL:
            processedState = ACTOR_STATE.CHILLED;
            break;

        default:
            processedState = ACTOR_STATE.NONE;
            break;
        }

        return(processedState);
    }
Exemplo n.º 5
0
        public ActionResult DeleteConfirmed(int id)
        {
            Haunt haunt = db.Haunts.Find(id);

            db.Haunts.Remove(haunt);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 6
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.name == "Player")
     {
         Debug.Log("exited kill zone");
         haunt = Haunt.Waiting;
     }
 }
Exemplo n.º 7
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.name == "Player")
     {
         Debug.Log("entered kill zone");
         haunt = Haunt.Haunting;
     }
 }
Exemplo n.º 8
0
 // Start is called before the first frame update
 void Awake()
 {
     global        = GameObject.Find("Global").GetComponent <Global>();
     myActionNames = new string[] { "Haunt", "...", "Unpossess", "..." };
     states        = new bool[4] {
         true, false, false, false
     };
     myHauntScript = gameObject.GetComponent <Haunt>();
 }
Exemplo n.º 9
0
 private void Start()
 {
     myActionNames = new string[] { "...", "...", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     myRigid       = gameObject.GetComponent <Rigidbody>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     states        = new bool[4] {
         false, false, false, false
     };
 }
Exemplo n.º 10
0
        //
        // GET: /Haunt/Edit/5

        public ActionResult Edit(int id = 0)
        {
            Haunt haunt = db.Haunts.Find(id);

            if (haunt == null)
            {
                return(HttpNotFound());
            }
            return(View(haunt));
        }
Exemplo n.º 11
0
 public ActionResult Edit(Haunt haunt)
 {
     if (ModelState.IsValid)
     {
         db.Entry(haunt).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(haunt));
 }
Exemplo n.º 12
0
 private void Start()
 {
     myAnim        = gameObject.GetComponent <Animator>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     myActionNames = new string[] { "Whirlwind", "...", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     states        = new bool[4] {
         true, false, false, false
     };
     audio = gameObject.GetComponent <AudioSource>();
 }
Exemplo n.º 13
0
 private void Start()
 {
     myActionNames = new string[] { "Random Pitch", "Volume Up", "Back...", "Volume Down" };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     radioSound    = gameObject.GetComponent <AudioSource>();
     jazz          = Resources.Load <AudioClip>("sounds/JazzSong_1");
     jazzDistorted = Resources.Load <AudioClip>("sounds/JazzSongDistorted_3");
     states        = new bool[4] {
         true, true, true, true
     };
 }
Exemplo n.º 14
0
        public ActionResult Create(Haunt haunt)
        {
            if (ModelState.IsValid)
            {
                db.Haunts.Add(haunt);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(haunt));
        }
Exemplo n.º 15
0
 private void Start()
 {
     buttonUpdater = GameObject.Find("Player").GetComponent <DynamicButtonUpdater>();
     audio         = gameObject.GetComponent <AudioSource>();
     myAnim        = gameObject.GetComponent <Animator>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     myActionNames = new string[] { "Open", "Smoke", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     states        = new bool[4] {
         true, true, false, false
     };
 }
Exemplo n.º 16
0
 private void Start()
 {
     animator      = gameObject.GetComponent <Animator>();
     myActionNames = new string[] { "Haunt Call", "...", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     states        = new bool[4] {
         true, false, false, false
     };
     myAudio = gameObject.GetComponent <AudioSource>();
     maxDis  = Vector3.Distance(transform.position, npcPosition.position) + 3f;
 }
Exemplo n.º 17
0
 private void Start()
 {
     global        = GameObject.Find("Global").GetComponent <Global>();
     myActionNames = new string[] { "Jazz", "Spooky", "Explode", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     radioSound    = gameObject.GetComponent <AudioSource>();
     jazz          = Resources.Load <AudioClip>("sounds/JazzSong_1");
     jazzDistorted = Resources.Load <AudioClip>("sounds/JazzSongDistorted_3");
     states        = new bool[4] {
         true, true, true, false
     };
 }
Exemplo n.º 18
0
 private void Start()
 {
     global        = GameObject.Find("Global").GetComponent <Global>();
     toggle        = true;
     rand          = Random.RandomRange(0.2f, 1.5f);
     flickering    = false;
     myActionNames = new string[] { "On/Off", "...", "Unhaunt", "Flicker" };
     states        = new bool[4] {
         true, false, true, true
     };
     myHaunt = GameObject.Find("Player").GetComponent <Haunt>();
 }
Exemplo n.º 19
0
    private void Start()
    {
        playing       = false;
        myActionNames = new string[] { "On/Off", "...", "Back...", "..." };

        myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
        radioSound    = gameObject.GetComponent <AudioSource>();
        jazz          = Resources.Load <AudioClip>("sounds/JazzSong_1");
        jazzDistorted = Resources.Load <AudioClip>("sounds/JazzSongDistorted_3");
        states        = new bool[4] {
            true, false, true, false
        };
    }
Exemplo n.º 20
0
 private void Start()
 {
     opened.SetActive(false);
     openedCollider.enabled = false;
     myTransform            = gameObject.transform;
     open          = false;
     myActionNames = new string[] { "Open", "Close", "Back...", "" };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     states        = new bool[4] {
         true, true, true, false
     };
 }
Exemplo n.º 21
0
 private void Start()
 {
     myMeshRenderer = gameObject.GetComponent <MeshRenderer>();
     audio          = gameObject.GetComponent <AudioSource>();
     myAnim         = gameObject.GetComponent <Animator>();
     global         = GameObject.Find("Global").GetComponent <Global>();
     myActionNames  = new string[] { "Spookify", "...", "...", "..." };
     myHaunt        = GameObject.Find("Player").GetComponent <Haunt>();
     states         = new bool[4] {
         true, false, false, false
     };
     //myMeshRenderer.material.SetTexture("currentTexture", getIndex(index));
 }
Exemplo n.º 22
0
 private void Start()
 {
     popped        = false;
     shakeStopper  = 0;
     myActionNames = new string[] { "Shake", "POP*", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     myRigid       = gameObject.GetComponent <Rigidbody>();
     shaking       = false;
     global        = GameObject.Find("Global").GetComponent <Global>();
     states        = new bool[4] {
         true, true, true, false
     };
 }
 private void Start()
 {
     cans     = 0;
     counter  = 0;
     shooting = false;
     mySodaCan.SetActive(false);
     myActionNames = new string[] { "Shoot Soda*", "...", "...", "..." };
     myHaunt       = GameObject.Find("Player").GetComponentInChildren <Haunt>();
     global        = GameObject.Find("Global").GetComponent <Global>();
     states        = new bool[4] {
         true, false, false, false
     };
 }
Exemplo n.º 24
0
 private void Start()
 {
     global = GameObject.Find("Global").GetComponent<Global>();
     timeHolder = 0;
     distorted = false;
     myActionNames = new string[] { "Distort", "Overload*", "Back...", "..." };
     states = new bool[4] { true, true, true, false };
     myHaunt = GameObject.Find("Player").GetComponent<Haunt>();
     radioSound = gameObject.GetComponent<AudioSource>();
     jazz = Resources.Load<AudioClip>("sounds/JazzSong_1");
     jazzDistorted = Resources.Load<AudioClip>("sounds/JazzSongDistorted_3");
     //jazzDistorted = Resources.Load<AudioClip>("sounds/");
 }
Exemplo n.º 25
0
 private void Start()
 {
     stopper       = 0f;
     global        = GameObject.Find("Global").GetComponent <Global>();
     levitating    = false;
     myActionNames = new string[] { "Levitate", "...", "Unhaunt", "..." };
     myHaunt       = GameObject.Find("Player").GetComponent <Haunt>();
     chair5.SetActive(false);
     chair6.SetActive(false);
     chair7.SetActive(false);
     chair8.SetActive(false);
     states = new bool[4] {
         true, false, true, false
     };
 }
Exemplo n.º 26
0
    void Update()
    {
        switch (haunt)
        {
        case Haunt.Waiting:
            Waiting();
            break;

        case Haunt.Haunting:

            /// NEW STUFF
            Vector3 center = new Vector3(bounds.center.x, bounds.center.y, 0);
            Vector2 dir    = player.position - center;

            RaycastHit2D hit = Physics2D.Raycast(rayOrigin, dir, Mathf.Infinity, collisionMask);
            Debug.DrawRay(rayOrigin, dir * 15f, Color.red);

            if (hit.collider != null)
            {
                if (hit.transform.gameObject.layer == LayerMask.NameToLayer("Player"))
                {
                    Debug.Log("I SEE YOU!");
                    Haunting();
                }
                else
                {
                    Waiting();
                }
            }
            ///

            if (color.a >= 1)
            {
                haunt = Haunt.Kill;
            }

            break;

        case Haunt.Kill:
            PlayerManager.instance.KillPlayer();
            haunt = Haunt.Waiting;
            break;
        }
    }
Exemplo n.º 27
0
        // Token: 0x06000310 RID: 784 RVA: 0x0001294C File Offset: 0x00010B4C
        public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu)
        {
            AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this);

            if (abilityHelper.UseAbility(this.abyssal, true))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.diffusal, true))
            {
                return(true);
            }
            if (abilityHelper.UseAbility(this.haunt, true))
            {
                return(true);
            }
            Haunt haunt = this.haunt;

            return((haunt != null && haunt.Ability.TimeSinceCasted < (float)10 && abilityHelper.UseAbility(this.reality, true)) || abilityHelper.UseAbility(this.bkb, true) || abilityHelper.UseAbility(this.dagger, true) || abilityHelper.UseAbility(this.manta, base.Owner.GetAttackRange(null, 0f)) || abilityHelper.UseAbility(this.vessel, true) || abilityHelper.UseAbility(this.urn, true) || abilityHelper.UseAbility(this.phase, true));
        }
Exemplo n.º 28
0
    // Start is called before the first frame update
    private void Awake()
    {
        start       = false;
        decalOpen   = false;
        decalStates = new bool[4] {
            true, false, true, false
        };
        global = GameObject.Find("Global").GetComponent <Global>(); // Shared pointer.

        player                     = GameObject.Find("Player");
        camera                     = GameObject.Find("Camera");
        cameraComponent            = camera.GetComponent <Camera>();
        possessCam                 = GameObject.Find("possessionCamera");
        possessCamComponent        = camera.GetComponent <Camera>();
        characterController        = player.GetComponent <CharacterController>();
        dynamicButtonUpdaterScript = gameObject.GetComponent <DynamicButtonUpdater>();
        myDecalActions             = gameObject.GetComponent <DecalActions>();
        myHauntActions             = gameObject.GetComponent <HauntActions>();
        myHauntScript              = gameObject.GetComponent <Haunt>();
        Platform();
        placeDecalScript = placeableDecal.GetComponent <placeDecal>();

        //lockMouse();

        cameraRotation     = new Vector3(0.0f, 0.0f, 0.0f);
        possessCamRotation = new Vector3(0.0f, 0.0f, 0.0f);

        startPosition = new Vector2(0.0f, 0.0f);
        deltaPosition = new Vector2(0.0f, 0.0f);
        endPosition   = new Vector2(0.0f, 0.0f);

        looking = false;

        //walkSlider = GameObject.Find("GUI/Debugger/Move Slider").GetComponent<Slider>();
        //lookSlider = GameObject.Find("GUI/Debugger/Look Slider").GetComponent<Slider>();

        walkSpeed = 10;
        lookSpeed = 5;

        //ActionWheelToggle = GameObject.Find("GUI/Debugger/Action Wheel Toggle").GetComponent<Toggle>();
    }