Example #1
0
        private void InitFireworksRules()
        {
            var m1   = CreateFireworkModel(Color.Red);
            var rule = new FireWorkRule(1, 0.5f, 1.4f, new Vector3(-5, 25, -5), new Vector3(5, 28, 5), 0.1f, m1);

            rule.Payloads.Add(new FireWorkRule.Payload(3, 5));
            rule.Payloads.Add(new FireWorkRule.Payload(5, 5));

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.Orange);
            rule = new FireWorkRule(2, 0.5f, 1.0f, new Vector3(-5, 10, -5), new Vector3(5, 20, 5), 0.8f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(4, 2));

            _rules.Add(rule);
            m1   = CreateFireworkModel(Color.Yellow);
            rule = new FireWorkRule(3, 0.5f, 1.5f, new Vector3(-5, -5, -5), new Vector3(5, 5, 5), 0.1f, m1);

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.Green);
            rule = new FireWorkRule(4, 0.25f, 0.5f, new Vector3(-20, 5, -5), new Vector3(20, 5, 5), 0.2f, m1);

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.Cyan);
            rule = new FireWorkRule(5, 0.5f, 1.0f, new Vector3(-20, 2, -5), new Vector3(20, 18, 5), 0.01f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(3, 5));

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.BlueViolet);
            rule = new FireWorkRule(6, 3f, 5f, new Vector3(-5, 5, -5), new Vector3(5, 10, 5), 0.95f, m1);


            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.Magenta);
            rule = new FireWorkRule(7, 4f, 5f, new Vector3(-5, 50, -5), new Vector3(5, 60, 5), 0.01f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(8, 10));

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.White);
            rule = new FireWorkRule(8, 0.25f, 0.5f, new Vector3(-1, -1, -1), new Vector3(1, 1, 1), 0.01f, m1);

            _rules.Add(rule);

            m1   = CreateFireworkModel(Color.Pink);
            rule = new FireWorkRule(9, 3f, 5f, new Vector3(-15, 10, -5), new Vector3(15, 15, 5), 0.95f, m1);

            _rules.Add(rule);
        }
Example #2
0
        private void InitFireworksRules() {
            
            var m1 = CreateFireworkModel(Color.Red);
            var rule = new FireWorkRule(1, 0.5f, 1.4f, new Vector3(-5, 25, -5), new Vector3(5, 28, 5), 0.1f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(3,5));
            rule.Payloads.Add(new FireWorkRule.Payload(5,5));

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.Orange);
            rule = new FireWorkRule(2, 0.5f, 1.0f, new Vector3(-5, 10, -5), new Vector3(5, 20, 5), 0.8f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(4, 2));

            _rules.Add(rule);
            m1 = CreateFireworkModel(Color.Yellow);
            rule = new FireWorkRule(3, 0.5f, 1.5f, new Vector3(-5,-5, -5), new Vector3(5, 5, 5), 0.1f, m1);

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.Green);
            rule = new FireWorkRule(4, 0.25f, 0.5f, new Vector3(-20, 5, -5), new Vector3(20, 5, 5), 0.2f, m1);

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.Cyan);
            rule = new FireWorkRule(5, 0.5f, 1.0f, new Vector3(-20, 2, -5), new Vector3(20, 18, 5), 0.01f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(3, 5));

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.BlueViolet);
            rule = new FireWorkRule(6, 3f, 5f, new Vector3(-5, 5, -5), new Vector3(5, 10, 5), 0.95f, m1);
            

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.Magenta);
            rule = new FireWorkRule(7, 4f, 5f, new Vector3(-5, 50, -5), new Vector3(5, 60, 5), 0.01f, m1);
            rule.Payloads.Add(new FireWorkRule.Payload(8, 10));

            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.White);
            rule = new FireWorkRule(8, 0.25f, 0.5f, new Vector3(-1, -1, -1), new Vector3(1, 1, 1), 0.01f, m1);
            
            _rules.Add(rule);

            m1 = CreateFireworkModel(Color.Pink);
            rule = new FireWorkRule(9, 3f, 5f, new Vector3(-15, 10, -5), new Vector3(15, 15, 5), 0.95f, m1);

            _rules.Add(rule);

        }