Пример #1
0
 public override void OnReset()
 {
     targetString = "";
     startIndex = 0;
     length = -1;
     storeResult = "";
 }
Пример #2
0
 public override void OnReset()
 {
     // Reset the properties back to their original values.
     behaviorGameObject = null;
     group = 0;
     waitForCompletion = false;
 }
Пример #3
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     successProbability = 0.5f;
     seed = 0;
     useSeed = false;
 }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     BossHP = (SharedInt)behaviorTree.GetVariable("BossHP");
       BossHP.Value = 500;
       WarriorHP = (SharedInt)GlobalVariables.Instance.GetVariable("WarriorHP");
       WarriorHP.Value = 200;
 }
Пример #5
0
 public override void OnReset()
 {
     // Reset the properties back to their original values
     behaviorGameObject = null;
     group = 0;
     pauseBehavior = false;
 }
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     maxTaskAccessCount = null;
     linkedTaskGuards = null;
     waitUntilTaskAvailable = true;
 }
Пример #7
0
 // Use this for initialization
 void Start()
 {
     BossHP = (SharedInt)behaviorTree.GetVariable("BossHP");
       BossHP.Value = 500;
       WarriorHP = (SharedInt)GlobalVariables.Instance.GetVariable("WarriorHP");
       WarriorHP.Value = 200;
       MageHP = (SharedInt)GlobalVariables.Instance.GetVariable("MageHP");
       MageHP.Value = 100;
       OppAtk = (SharedInt)behaviorTree.GetVariable("OppAtk");
       OppAtk.Value = 0;
       PShielded = (SharedInt)behaviorTree.GetVariable("PShielded");
       PShielded.Value = 0;
 }
        protected override void OnCreate(Bundle bundle)
        {
            sharedModel = new SharedInt();
            base.OnCreate (bundle);

            // Set our view from the "main" layout resource
            SetContentView (Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button> (Resource.Id.myButton);

            this.sharedModel.IncrementInt();

            button.Click += delegate {
                button.Text = string.Format ("{0} clicks!", this.sharedModel.sharedInt);
                this.sharedModel.IncrementInt();
            };
        }
Пример #9
0
 public virtual void OnReset()
 {
     this.targetGameObject = (SharedGameObject)null;
     this.index            = (SharedInt)0;
     this.storeValue       = (SharedFloat)0.0f;
 }
Пример #10
0
 public override void OnReset()
 {
     this.maxTaskAccessCount     = null;
     this.linkedTaskGuards       = null;
     this.waitUntilTaskAvailable = true;
 }
Пример #11
0
 public override void OnReset()
 {
     questEntryName   = "";
     questEntryNumber = 0;
     storeResult      = "";
 }
Пример #12
0
 public override void OnReset()
 {
     targetGameObject = null;
     index = 0;
 }
 public override void OnReset()
 {
     targetGameObject = null;
     layerIndex = 0;
     storeValue = 0;
 }
Пример #14
0
 public override void OnReset()
 {
     buttonIndex = 0;
 }
 public override void OnReset()
 {
     blueprintID = 0;
     learned = false;
 }
Пример #16
0
 public override void OnReset()
 {
     index             = 0;
     storedVector3List = null;
 }
Пример #17
0
 public override void OnReset()
 {
     targetGameObject = null;
     paramaterName    = "";
     storeValue       = 0;
 }
Пример #18
0
 public virtual void OnReset()
 {
     this.stateName  = (SharedString)string.Empty;
     this.storeValue = (SharedInt)0;
 }
Пример #19
0
 public override void OnReset()
 {
     firstString  = "";
     secondString = "";
     storeResult  = 0;
 }
Пример #20
0
 public override void OnReset()
 {
     currentIndex = 0;
 }
Пример #21
0
 public override void OnReset()
 {
     buttonIndex = 0;
     storeResult = false;
 }
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.layerIndex       = 0;
     this.storeValue       = 0;
 }
Пример #23
0
 public override void OnReset()
 {
     targetGameObject = null;
     index            = 0;
     name             = "";
 }
Пример #24
0
 public override void OnReset()
 {
     key          = "";
     defaultValue = 0;
     storeResult  = 0;
 }
Пример #25
0
 public override void OnReset()
 {
     targetGameObject = null;
     stateName        = "";
     layer            = -1;
 }
 public override void OnReset()
 {
     minAmount = 0;
     maxAmount = 0;
     items     = null;
 }
Пример #27
0
 public override void OnReset()
 {
     targetGameObject = null;
     paramaterName = "";
     storeValue = 0;
 }
Пример #28
0
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue = 1;
 }
Пример #29
0
 public override void OnReset()
 {
     variable = 0;
     compareTo = 0;
 }
Пример #30
0
 public override void OnReset()
 {
     targetGameObject = null;
     priority = 1;
 }
Пример #31
0
 public override void OnReset()
 {
     targetGameObject = null;
     direction = 0;
 }
Пример #32
0
 public virtual void OnReset()
 {
     this.intVariable = (SharedInt)0;
 }
Пример #33
0
        // Reset the public variables
        public override void OnReset()
        {
            base.OnReset();

            maxCoverDistance = 1000;
            maxRaycasts = 100;
            rayStep = 1;
            coverOffset = 2;
            lookAtCoverPoint = false;
            rotationEpsilon = 0.5f;
        }
Пример #34
0
 public override void OnReset()
 {
     weaponIndex = 0;
     agent       = null;
 }
Пример #35
0
 public override void OnReset()
 {
     targetGameObject = null;
     index            = 0;
     weight           = 0;
 }
Пример #36
0
 public override void OnReset()
 {
     intVariable = 0;
     minValue    = 0;
     maxValue    = 0;
 }
Пример #37
0
 /// <summary>
 /// Resets the objects back to their default values.
 /// </summary>
 public override void OnReset()
 {
     m_TargetGameObject = null;
     m_AbilityType      = string.Empty;
     m_PriorityIndex    = -1;
 }
Пример #38
0
 public virtual void OnReset()
 {
     this.count        = (SharedInt)0;
     this.endOnFailure = (SharedBool)true;
 }
 public ViewController(IntPtr handle)
     : base(handle)
 {
     sharedModel = new SharedInt();
 }
Пример #40
0
 public override void OnReset()
 {
     buttonIndex = 0;
     storeResult = false;
 }
Пример #41
0
 public override void OnReset()
 {
     // Reset the public properties back to their original values.
     count = 0;
     endOnFailure = true;
 }
Пример #42
0
 public override void OnReset()
 {
     variable  = 0;
     compareTo = 0;
 }
Пример #43
0
 public override void OnReset()
 {
     key = "";
     value = 0;
 }
Пример #44
0
 public override void OnReset()
 {
     targetGameObject = null;
     storeValue       = 0;
 }
Пример #45
0
 public override void OnReset()
 {
     targetGameObject = null;
     maxParticles = 0;
 }
Пример #46
0
 public override void OnReset()
 {
     stateName = "";
     storeValue = 0;
 }
 public override void OnReset()
 {
     item = null;
     amount = 1;
     collection = null;
 }
 public override void OnReset()
 {
     // Reset the public properties back to their original values
     targetGameObject = null;
     group            = 0;
 }
Пример #49
0
 public override void OnReset()
 {
     intVariable = minValue = maxValue = 0;
 }
Пример #50
0
 public override void OnReset()
 {
     key   = "";
     value = 0;
 }
Пример #51
0
        public override void OnReset()
        {
            storedVector3List = null;

            maxCount = null;
        }
Пример #52
0
 public override void OnReset()
 {
     blueprintID = 0;
     learned     = false;
 }
Пример #53
0
 public override void OnReset()
 {
     intVariable = 0;
 }
Пример #54
0
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.maxParticles     = 0;
 }
Пример #55
0
 public override void OnReset()
 {
     targetValue = 0;
     targetVariable = 0;
 }
Пример #56
0
 public override void OnReset()
 {
     intVariable = 0;
 }
Пример #57
0
 public override void OnReset()
 {
     targetString = "";
     storeResult = 0;
 }
Пример #58
0
 public override void OnReset()
 {
     firstString = "";
     secondString = "";
     storeResult = 0;
 }
Пример #59
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        GoneWrong.WeaponControl weaponControl = animator.GetComponent <GoneWrong.WeaponControl>();
        SharedInt equippedWeapon  = weaponControl.equippedWeapon;
        Inventory playerInventory = weaponControl.playerInventory;

        // Get the weapon mount of the current equipped weapon
        InventoryWeaponMount weaponMount = null;

        if (equippedWeapon.value == 0)
        {
            weaponMount = playerInventory.rifle1;
        }
        else if (equippedWeapon.value == 1)
        {
            weaponMount = playerInventory.rifle2;
        }
        else if (equippedWeapon.value == 2)
        {
            weaponMount = playerInventory.handgun;
        }
        if (equippedWeapon.value == 3)
        {
            weaponMount = playerInventory.melee;
        }


        // We need to keep track of weather we found rounds in our invventory if the weapon is partial
        // So we could stop the reload animation
        bool foundRounds = false;

        for (int i = 0; i < playerInventory.ammo.Count; i++)
        {
            // We get the ammo mount for each ammo we have
            InventoryAmmoMount ammoMount = playerInventory.ammo[i];
            if (ammoMount == null || ammoMount.item == null)
            {
                continue;
            }

            // We check if the ammo applies to the equipped weapon
            if (ammoMount.item.weapon == weaponMount.item)
            {
                // If the weapon reload type is partial, we just add one single bullet
                if (weaponMount.item.partialReload)
                {
                    // If we have attained the last round that can be loaded, then we force ourselves to stop reloading
                    if (weaponMount.rounds >= weaponMount.item.ammoCapacity)
                    {
                        animator.SetBool("Reload", false);
                    }

                    foundRounds = true;

                    break;
                }
            }
        }

        if (weaponMount.item.partialReload && !foundRounds)
        {
            animator.SetBool("Reload", false);
        }
    }
Пример #60
0
 public override void OnReset()
 {
     this.targetGameObject = null;
     this.direction        = 0;
 }