Inheritance: MonoBehaviour
Esempio n. 1
0
 private void ThrowSacrifice()
 {
     Game.Instance.RaiseSacrificeThrown(sacrifice);
     sacrifice.MovementState = MovementState.Flying;
     sacrifice.UseGravity(0);
     sacrifice.AllowCollision(true);
     dragJoint.connectedBody = null;
     sacrifice = null;
 }
Esempio n. 2
0
        private int sacrifice()
        {
            var multi     = getAttackMultiplier();
            var increase  = getAttackModifier();
            var sacrifice = new Sacrifice();

            Cooldowns[3] = sacrifice.Cooldown;
            Health      -= (Health / 10);
            return(sacrifice.Action(SpellPower, Crit, multi, increase));
        }
Esempio n. 3
0
 public void Enqueue(Sacrifice sacrifice)
 {
     foreach (Transform t in queueSpots)
     {
         if (!assignments.ContainsKey(t))
         {
             assignments.Add(t, sacrifice);
             sacrifice.queueSpot = t;
             return;
         }
     }
 }
Esempio n. 4
0
        public static GameplayState Create()
        {
            var newGame = new GameplayState();

            newGame.Random    = new Random();
            newGame.Sacrifice = Sacrifice.CreateFirst(newGame);
            newGame.SacrificeRequiredInMilleseconds = newGame.Sacrifice.TimeRequiredInMilleseconds;
            newGame.Player      = new Player(newGame);
            newGame.Rooms       = newGame.GenerateRooms();
            newGame.CurrentRoom = newGame.Rooms[0];

            return(newGame);
        }
Esempio n. 5
0
 private void KillOrReleaseSacrifice(Sacrifice sacrifice)
 {
     if (dropZoneType == DropZoneType.Kill)
     {
         sacrifice.Kill();
     }
     else if (dropZoneType == DropZoneType.Miss)
     {
         sacrifice.Miss();
     }
     else
     {
         sacrifice.Release();
     }
 }
Esempio n. 6
0
    private void Dequeue(Sacrifice sacrifice)
    {
        assignments.Remove(sacrifice.queueSpot);
        sacrifice.queueSpot = null;

        for (int i = 0; i < queueSpots.Count - 1; ++i)
        {
            if (assignments.ContainsKey(queueSpots[i + 1]))
            {
                assignments[queueSpots[i]] = assignments[queueSpots[i + 1]];
                assignments[queueSpots[i + 1]].queueSpot = queueSpots[i];
                assignments.Remove(queueSpots[i + 1]);
            }
        }

        StartCoroutine(MoveSacrificesOneByOne());
    }
Esempio n. 7
0
    private void OnSacrificeThrown(Sacrifice sacrifice)
    {
        switch (sacrifice.Data.type)
        {
        case SacrificeType.Male:
            manScream.Play();
            break;

        case SacrificeType.Female:
            womanScream.Play();
            break;

        case SacrificeType.Wilhelm:
            wilhelmScream.Play();
            break;
        }
    }
Esempio n. 8
0
        internal void CompleteTheSacrifice()
        {
            AudioPlayer.PlaySfx("good");
            Player.HP = Player.MaxHP;
            SacrificeRequiredInMilleseconds = Sacrifice.TimeRequiredInMilleseconds;
            var nextSacrifice = Sacrifice.Next();

            if (nextSacrifice == null)
            {
                YouWin = true;
                return;
            }
            Player.HP                       = Player.MaxHP;
            Player.GoldCollected           -= Sacrifice.GoldRequired;
            Player.SoulsCollected          -= Sacrifice.SoulsRequired;
            Sacrifice                       = nextSacrifice;
            SacrificeRequiredInMilleseconds = Sacrifice.TimeRequiredInMilleseconds;
        }
    private void OnSacrificeMissed(Sacrifice sacrifice)
    {
        print("SacrificeInfoPanel - Miss Triggered");
        float random = UnityEngine.Random.Range(0f, 3f);

        if (random > 2f)
        {
            ShowKingText("What are you doing? Try again!");
        }
        else if (random > 1f)
        {
            ShowKingText("It's still good. Try again!");
        }
        else
        {
            ShowKingText("Don't break them! Try again!");
        }
    }
Esempio n. 10
0
    public override void Cast()
    {
        Use = true;
        var      list      = Person.curArmy.army;
        float    heal      = 0;
        Regiment sacrifice = null;

        for (int i = 0; i < list.Count; i++)
        {
            if (list[i].count > heal)
            {
                heal      = list[i].count;
                sacrifice = list[i];
            }
        }

        list.Remove(sacrifice);
        Person.curArmy.Heal(heal * Sacrifice.SacrificeEffect(Level));
        SkillAction = new GameAction(CullDown, () => StopUse());
    }
Esempio n. 11
0
    void SacInit()
    {
        sacrifices     = new Sacrifice[11];
        sacrifices[0]  = new Sacrifice("Eye - you can see");
        sacrifices[1]  = new Sacrifice("Eye - you can see");
        sacrifices[2]  = new Sacrifice("Going back - A");
        sacrifices[3]  = new Sacrifice("Jump - W");
        sacrifices[4]  = new Sacrifice("Ear - you can hear");
        sacrifices[5]  = new Sacrifice("Ear - you can hear");
        sacrifices[6]  = new Sacrifice("Interaction - E");
        sacrifices[7]  = new Sacrifice("Friend");
        sacrifices[8]  = new Sacrifice("Attack - Space");
        sacrifices[9]  = new Sacrifice("Life - you can try again if you have a life");
        sacrifices[10] = new Sacrifice("Death - R");

        for (int i = 0; i < sacrifices.Length; i++)
        {
            sacrifices[i].button = buttonsParent.transform.GetChild(i).GetComponent <Button>();
        }
    }
Esempio n. 12
0
        protected override void _Process(dynamic incomingData, Action <IFlowResult> callBack)
        {
            ConsoleAccessor.WriteLine("Demonology v0.1: Initiation Ritual.");
            ConsoleAccessor.WriteLine("-------------------------------------");
            ConsoleAccessor.WriteLine("What offering do you want to sacrifice?");
            ConsoleAccessor.WriteLine("Goat | Ox | Human");
            ConsoleAccessor.Write("-> ");

            var initialInput = ConsoleAccessor.Read();

            if (string.IsNullOrEmpty(initialInput) || !Enum.TryParse(initialInput, ignoreCase: true, result: out SacrificeType offering))
            {
                ConsoleAccessor.WriteLine("Your sacrifice is unacceptable!");
                callBack(new FlowResult(Guid.Empty, new RitualComplete(), mustHandle: true));
                return;
            }

            var sacrifice = new Sacrifice(offering);

            callBack(new FlowResult(sacrifice));
        }
Esempio n. 13
0
    public void DoSacrifice()
    {
        locked = true;

        ScoreController.Instance.AddScore();
        ScreenShaker.Instance.Invoke("ShakeInSeconds", 1.75f);

        Camera.main.GetComponent <AudioSource>().PlayOneShot(flingSound);
        Camera.main.GetComponent <AudioSource>().PlayOneShot(screamSounds[Random.Range(0, screamSounds.Length)], 0.25f);

        GameObject sac = sacrificeLine[sacrificeLine.Count - 1];

        sacrificeLine.RemoveAt(sacrificeLine.Count - 1);

        Sacrifice s = Instantiate(flyingSacrificeObject, sac.transform.position, Quaternion.identity, sacrificeParent).GetComponent <Sacrifice>();

        s.GetComponentInChildren <SpriteRenderer>().sprite = flyingSacrificeSprites[Random.Range(0, flyingSacrificeSprites.Length)];
        s.DoFly();

        Destroy(sac);

        StartCoroutine("DoStepUp");
    }
Esempio n. 14
0
 private void OnSacrificeReleased(Sacrifice sacrifice)
 {
     print("SacrificeInfoPanel - Released Triggered");
     if (pointSystem.KingFavor > 80)
     {
         ShowKingText("Well, it was barely worth it!");
     }
     else if (pointSystem.KingFavor > 60)
     {
         ShowKingText("You are starting to anger me!");
     }
     else if (pointSystem.KingFavor > 40)
     {
         ShowKingText("Don't do this again! I am warning you!");
     }
     else if (pointSystem.KingFavor > 20)
     {
         ShowKingText("You are this close to unleashing my wrath upon you and your family!");
     }
     else if (pointSystem.KingFavor > 0)
     {
         ShowKingText("This was the final straw!");
     }
 }
Esempio n. 15
0
 public void RaiseSacrificeMissed(Sacrifice sacrifice)
 {
     SacrificeMissed?.Invoke(sacrifice);
     CheckGameEnd();
 }
Esempio n. 16
0
 public void RaiseSacrificeReleased(Sacrifice sacrifice)
 {
     peopleSaved.Add(sacrifice.Data);
     SacrificeReleased?.Invoke(sacrifice);
     CheckGameEnd();
 }
Esempio n. 17
0
 public void RaiseSacrificeHappened(Sacrifice sacrifice)
 {
     peopleSacrificed.Add(sacrifice.Data);
     SacrificeKilled?.Invoke(sacrifice);
     CheckGameEnd();
 }
Esempio n. 18
0
 public void RaiseSacrificeHitTerrain(Sacrifice sacrifice)
 {
     SacrificeHitTerrain?.Invoke(sacrifice);
 }
Esempio n. 19
0
 public void SacrificeMissed(Sacrifice sacrifice)
 {
     sacrifice.kingFavorNegativeModifier *= missPenalty;
 }
Esempio n. 20
0
 private void OnSacrificeReleased(Sacrifice sacrifice)
 {
     splash.Play();
 }
Esempio n. 21
0
 public void RaiseSacrificeThrown(Sacrifice sacrifice)
 {
     SacrificeThrown?.Invoke(sacrifice);
 }
Esempio n. 22
0
 public void AddSacrifice(Sacrifice sac)
 {
     db.Sacrifices.Add(sac);
     Save();
 }
Esempio n. 23
0
 private void OnSacrificeReady(Sacrifice sacrifice)
 {
     this.sacrifice          = sacrifice;
     dragJoint.connectedBody = sacrifice.getRigidbodyToBeDragged();
 }
Esempio n. 24
0
 private void OnDraggingStarted(Sacrifice sacrifice)
 {
     //StartCoroutine(PlayDraggingAudio());
 }
Esempio n. 25
0
 private void OnTerrainHit(Sacrifice sacrifice)
 {
     impactSound.Play();
 }
Esempio n. 26
0
 public void RaiseSacrificeReady(Sacrifice sacrifice)
 {
     SacrificeReady?.Invoke(sacrifice);
 }
Esempio n. 27
0
 public void RaiseSacrificeDraggingStarted(Sacrifice sacrifice)
 {
     SacrificeDraggingStarted?.Invoke(sacrifice);
 }
 void Start()
 {
     Sacrifice       = GameObject.FindGameObjectWithTag("Sacrifice").GetComponent <Sacrifice>();
     ObstacleSpawner = GameObject.FindGameObjectWithTag("ObstacleSpawner").GetComponent <ObstacleSpawner>();
 }
Esempio n. 29
0
 public void SacrificeReleased(Sacrifice sacrifice)
 {
     kingFavor -= sacrifice.KingFavorNegativeModifier;
     RaisePointsChangedEvent();
 }
Esempio n. 30
0
 private void OnSacrificeKilled(Sacrifice sacrifice)
 {
     volcanoNoise.Play();
 }