// [TypeInfo RVA: 0x0]
public class RampagingPhaseone : MonoBehaviourPun
{
	public float DetectionRange; // 0x28
	public string tagString; // 0x30
	public float MonsterSpeedWander; // 0x38
	public float MonsterSpeedChase; // 0x3C
	public UnityEngine.Transform[] points; // 0x40
	public UnityEngine.GameObject rampageObject; // 0x48
	public float chaseDuration; // 0x50
	private UnityEngine.AI.NavMeshAgent agent; // 0x58
	private UnityEngine.GameObject currentTarget; // 0x60
	private float chaseTimer; // 0x68
	private bool rampageTriggered; // 0x6C

	// RVA: 0x3221AF4 VA: 0x781890CAF4
	private void Start();
	/*
	 *   undefined *puVar1;
	 *   uint uVar2;
	 *   void *pvVar3;
	 *   ulong uVar4;
	 *   long lVar5;
	 *   void *obj;
	 *   void **ppvVar6;
	 *   UnityEngine_Vector3 UVar7;
	 *   float fStack_2c;
	 *   float fStack_28;
	 *   float fStack_24;
	 *
	 *   puVar1 = PTR_DAT_070c08f8;
	 *   if ((bRam000000000754a8cc & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c08f8);
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     bRam000000000754a8cc = 1;
	 *   }
	 *   pvVar3 = (void *)func_0x0373df50(this,*(undefined8 *)puVar1);
	 *   ppvVar6 = &this.agent;
	 *   *ppvVar6 = pvVar3;
	 *   func_0x031fdc38(ppvVar6,pvVar3);
	 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if (*ppvVar6 != null) {
	 *     UnityEngine.AI.NavMeshAgent.set_speed(*ppvVar6,this.MonsterSpeedWander);
	 *     pvVar3 = this.rampageObject;
	 *     if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *       func_0x031fde08();
	 *     }
	 *     uVar4 = UnityEngine.Object.op_Inequality(pvVar3,null);
	 *     if ((uVar4 & 1) != 0) {
	 *       if (this.rampageObject == null) goto LAB_03321bbc;
	 *       UnityEngine.GameObject.SetActive(this.rampageObject,false);
	 *     }
	 *     if (this.points != null) {
	 *       lVar5 = *(long *)((long)this.points + 0x18);
	 *       if (lVar5 == 0) {
	 *         return;
	 *       }
	 *       uVar2 = Random.Range(0,(int)lVar5);
	 *       pvVar3 = this.points;
	 *       if (pvVar3 != null) {
	 *         if (*(uint *)((long)pvVar3 + 0x18) <= uVar2) {
	 *           IL2CPP.ThrowIndexOutOfRangeException();
	 *         }
	 *         pvVar3 = *(void **)((long)pvVar3 + (long)(int)uVar2 * 8 + 0x20);
	 *         if (pvVar3 != null) {
	 *           obj = this.agent;
	 *           UVar7 = UnityEngine.Transform.get_position(pvVar3);
	 *           fStack_24 = UVar7.z;
	 *           fStack_28 = UVar7.y;
	 *           fStack_2c = UVar7.x;
	 *           if (obj != null) {
	 *             if ((bRam000000000755cc30 & 1) == 0) {
	 *               func_0x031fdc8c(PTR_DAT_0714d7a8,0);
	 *               bRam000000000755cc30 = 1;
	 *             }
	 *             if (obj != null) {
	 *               lVar5 = *(long *)((long)obj + 0x10);
	 *               if (lVar5 == 0) {
	 *                 UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *               }
	 *               if (pcRam000000000755cc48 == null) {
	 *                 pcRam000000000755cc48 = (code *)func_0x031fdc50(&UNK_01356108);
	 *               }
	 *               (*pcRam000000000755cc48)(lVar5,&fStack_2c);
	 *               return;
	 *             }
	 *             IL2CPP.ThrowNullReferenceException();
	 *           }
	 *         }
	 *       }
	 *     }
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 * LAB_03321bbc:
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3221C34 VA: 0x781890CC34
	private void Update();
	/*
	 *   undefined *puVar1;
	 *   bool bVar2;
	 *   uint uVar3;
	 *   void *pvVar4;
	 *   void *pvVar5;
	 *   ulong uVar6;
	 *   long lVar7;
	 *   void *extraout_x1;
	 *   void *pvVar8;
	 *   void *pvVar9;
	 *   uint uVar10;
	 *   float fVar11;
	 *   float fVar12;
	 *   float fVar13;
	 *   float fVar14;
	 *   UnityEngine_Vector3 UVar15;
	 *   UnityEngine_Vector3 UVar16;
	 *
	 *   puVar1 = typeinfo_ptr_PhotonUnityNetworking_PhotonNetwork_6FC08F0;
	 *   if ((bRam000000000754a8cd & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     func_0x031fdc8c(typeinfo_ptr_PhotonUnityNetworking_PhotonNetwork_6FC08F0);
	 *     bRam000000000754a8cd = 1;
	 *     methodInfo = extraout_x1;
	 *   }
	 *   if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *     func_0x031fde08(*(long *)puVar1,methodInfo);
	 *   }
	 *   bVar2 = Photon.Pun.PhotonNetwork.get_IsMasterClient();
	 *   pvVar4 = this.agent;
	 *   if (bVar2) {
	 *     if (pvVar4 != null) {
	 *       UnityEngine.InputSystem.OnScreen.OnScreenStick.Behaviour.set_enabled(pvVar4,true);
	 *       pvVar4 = UnityEngine.GameObject.FindGameObjectsWithTag(this.tagString);
	 *       puVar1 = typeinfo_ptr_mscorlib_Math_6FC0738;
	 *       if (pvVar4 != null) {
	 *         uVar3 = *(uint *)((long)pvVar4 + 0x18);
	 *         if ((int)uVar3 < 1) {
	 *           pvVar9 = null;
	 *         }
	 *         else {
	 *           uVar10 = 0;
	 *           fVar12 = 3.4028235e+38;
	 *           pvVar8 = null;
	 *           do {
	 *             if (uVar3 <= uVar10) {
	 *               IL2CPP.ThrowIndexOutOfRangeException();
	 *             }
	 *             pvVar9 = *(void **)((long)pvVar4 + (long)(int)uVar10 * 8 + 0x20);
	 *             pvVar5 = UnityEngine.Component.get_transform(this);
	 *             if (pvVar5 == null) goto LAB_03321fb4;
	 *             UVar15 = UnityEngine.Transform.get_position(pvVar5);
	 *             if ((pvVar9 == null) ||
	 *                (pvVar5 = UnityEngine.GameObject.get_transform(pvVar9), pvVar5 == null)) goto LAB_03321fb4;
	 *             UVar16 = UnityEngine.Transform.get_position(pvVar5);
	 *             if (cRam000000000754a7c9 == '\0') {
	 *               func_0x031fdc8c(puVar1);
	 *               cRam000000000754a7c9 = '\x01';
	 *             }
	 *             if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *               func_0x031fde08();
	 *             }
	 *             fVar11 = UVar15.y - UVar16.y;
	 *             fVar13 = UVar15.x - UVar16.x;
	 *             uVar10 = uVar10 + 1;
	 *             fVar14 = UVar15.z - UVar16.z;
	 *             fVar11 = SQRT(fVar14 * fVar14 + fVar13 * fVar13 + fVar11 * fVar11);
	 *             uVar3 = *(uint *)((long)pvVar4 + 0x18);
	 *             if (this.DetectionRange <= fVar11 || fVar12 <= fVar11) {
	 *               pvVar9 = pvVar8;
	 *               fVar11 = fVar12;
	 *             }
	 *             fVar12 = fVar11;
	 *             pvVar8 = pvVar9;
	 *           } while ((int)uVar10 < (int)uVar3);
	 *         }
	 *         puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *         if (*(int *)(*(long *)typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8 + 0xe4) == 0) {
	 *           func_0x031fde08();
	 *         }
	 *         uVar6 = UnityEngine.Object.op_Inequality(pvVar9,null);
	 *         if ((uVar6 & 1) == 0) {
	 *           this.currentTarget = null;
	 *           func_0x031fdc38(&this.currentTarget,0);
	 *           this.chaseTimer = 0.0;
	 *           this.rampageTriggered = false;
	 *           if (this.agent != null) {
	 *             bVar2 = UnityEngine.AI.NavMeshAgent.get_pathPending(this.agent);
	 *             if (bVar2) {
	 *               return;
	 *             }
	 *             if (this.agent != null) {
	 *               fVar12 = UnityEngine.AI.NavMeshAgent.get_remainingDistance(this.agent);
	 *               if (0.5 <= fVar12) {
	 *                 return;
	 *               }
	 *               if (this.agent != null) {
	 *                 UnityEngine.AI.NavMeshAgent.set_speed(this.agent,this.MonsterSpeedWander);
	 *                 if (this.points != null) {
	 *                   lVar7 = *(long *)((long)this.points + 0x18);
	 *                   if (lVar7 == 0) {
	 *                     return;
	 *                   }
	 *                   uVar3 = Random.Range(0,(int)lVar7);
	 *                   pvVar4 = this.points;
	 *                   if (pvVar4 != null) {
	 *                     if (*(uint *)((long)pvVar4 + 0x18) <= uVar3) {
	 *                       IL2CPP.ThrowIndexOutOfRangeException();
	 *                     }
	 *                     pvVar4 = *(void **)((long)pvVar4 + (long)(int)uVar3 * 8 + 0x20);
	 *                     if (pvVar4 != null) {
	 *                       pvVar9 = this.agent;
	 *                       UnityEngine.Transform.get_position(pvVar4);
	 *                       if (pvVar9 != null) {
	 *                         if ((bRam000000000755cc30 & 1) == 0) {
	 *                           func_0x031fdc8c(PTR_DAT_0714d7a8,0);
	 *                           bRam000000000755cc30 = 1;
	 *                         }
	 *                         if (pvVar9 != null) {
	 *                           lVar7 = *(long *)((long)pvVar9 + 0x10);
	 *                           if (lVar7 == 0) {
	 *                             UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar9);
	 *                           }
	 *                           if (pcRam000000000755cc48 == null) {
	 *                             pcRam000000000755cc48 = (code *)func_0x031fdc50(&UNK_01356108);
	 *                           }
	 *                           (*pcRam000000000755cc48)(lVar7,&stack0xffffffffffffffd4);
	 *                           return;
	 *                         }
	 *                         IL2CPP.ThrowNullReferenceException();
	 *                       }
	 *                     }
	 *                   }
	 *                 }
	 *                 IL2CPP.ThrowNullReferenceException();
	 *               }
	 *             }
	 *           }
	 *         }
	 *         else {
	 *           pvVar4 = this.currentTarget;
	 *           if (*(int *)(*(long *)puVar1 + 0xe4) == 0) {
	 *             func_0x031fde08();
	 *           }
	 *           pvVar8 = null;
	 *           uVar6 = UnityEngine.Object.op_Inequality(pvVar4,pvVar9);
	 *           if ((uVar6 & 1) != 0) {
	 *             this.currentTarget = pvVar9;
	 *             func_0x031fdc38(&this.currentTarget,pvVar9);
	 *             this.chaseTimer = 0.0;
	 *             this.rampageTriggered = false;
	 *           }
	 *           if (this.agent != null) {
	 *             UnityEngine.AI.NavMeshAgent.set_speed(this.agent,this.MonsterSpeedChase);
	 *             if (this.currentTarget != null) {
	 *               pvVar4 = UnityEngine.GameObject.get_transform(this.currentTarget);
	 *               RampagingPhaseone.Chase(this,pvVar4);
	 *               fVar11 = this.chaseTimer;
	 *               fVar12 = UnityEngine.Time.get_deltaTime();
	 *               fVar11 = fVar11 + fVar12;
	 *               this.chaseTimer = fVar11;
	 *               puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *               if (this.rampageTriggered != false) {
	 *                 return;
	 *               }
	 *               if (fVar11 < this.chaseDuration) {
	 *                 return;
	 *               }
	 *               if ((bRam000000000754a8ce & 1) == 0) {
	 *                 func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *                 bRam000000000754a8ce = 1;
	 *               }
	 *               lVar7 = *(long *)puVar1;
	 *               pvVar4 = this.rampageObject;
	 *               this.rampageTriggered = true;
	 *               if (*(int *)(lVar7 + 0xe4) == 0) {
	 *                 func_0x031fde08();
	 *               }
	 *               uVar6 = UnityEngine.Object.op_Inequality(pvVar4,null);
	 *               if ((uVar6 & 1) == 0) {
	 *                 return;
	 *               }
	 *               pvVar4 = this.rampageObject;
	 *               if (pvVar4 == null) {
	 *                 IL2CPP.ThrowNullReferenceException();
	 *               }
	 *               if ((bRam000000000755f7e0 & 1) == 0) {
	 *                 func_0x031fdc8c(PTR_DAT_0714f3e0,1,0);
	 *                 bRam000000000755f7e0 = 1;
	 *               }
	 *               if (pvVar4 != null) {
	 *                 lVar7 = *(long *)((long)pvVar4 + 0x10);
	 *                 if (lVar7 == 0) {
	 *                   UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar4);
	 *                 }
	 *                 if (pcRam000000000755f860 == null) {
	 *                   pcRam000000000755f860 = (code *)func_0x031fdc50(&UNK_0138da18);
	 *                 }
	 *                 (*pcRam000000000755f860)(lVar7,1);
	 *                 return;
	 *               }
	 *               IL2CPP.ThrowNullReferenceException();
	 *             }
	 *           }
	 *         }
	 *       }
	 *     }
	 *   }
	 *   else if (pvVar4 != null) {
	 *     if ((bRam000000000755f745 & 1) == 0) {
	 *       func_0x031fdc8c(PTR_DAT_0714f3a0,0,0);
	 *       bRam000000000755f745 = 1;
	 *     }
	 *     if (pvVar4 != null) {
	 *       lVar7 = *(long *)((long)pvVar4 + 0x10);
	 *       if (lVar7 == 0) {
	 *         UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar4)
	 *         ;
	 *       }
	 *       if (pcRam000000000755f750 == null) {
	 *         pcRam000000000755f750 = (code *)func_0x031fdc50(&UNK_0137c3e0);
	 *       }
	 *       (*pcRam000000000755f750)(lVar7,0);
	 *       return;
	 *     }
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 * LAB_03321fb4:
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3221FEC VA: 0x781890CFEC
	private void TriggerRampage();
	/*
	 *   undefined *puVar1;
	 *   long lVar2;
	 *   ulong uVar3;
	 *   void *extraout_x1;
	 *   void *pvVar4;
	 *
	 *   puVar1 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   if ((bRam000000000754a8ce & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8);
	 *     bRam000000000754a8ce = 1;
	 *     methodInfo = extraout_x1;
	 *   }
	 *   lVar2 = *(long *)puVar1;
	 *   pvVar4 = this.rampageObject;
	 *   this.rampageTriggered = true;
	 *   if (*(int *)(lVar2 + 0xe4) == 0) {
	 *     func_0x031fde08(lVar2,methodInfo);
	 *   }
	 *   uVar3 = UnityEngine.Object.op_Inequality(pvVar4,null);
	 *   if ((uVar3 & 1) == 0) {
	 *     return;
	 *   }
	 *   pvVar4 = this.rampageObject;
	 *   if (pvVar4 == null) {
	 *     IL2CPP.ThrowNullReferenceException();
	 *   }
	 *   if ((bRam000000000755f7e0 & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_0714f3e0,1,0);
	 *     bRam000000000755f7e0 = 1;
	 *   }
	 *   if (pvVar4 != null) {
	 *     lVar2 = *(long *)((long)pvVar4 + 0x10);
	 *     if (lVar2 == 0) {
	 *       UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(pvVar4);
	 *     }
	 *     if (pcRam000000000755f860 == null) {
	 *       pcRam000000000755f860 = (code *)func_0x031fdc50(&UNK_0138da18);
	 *     }
	 *     (*pcRam000000000755f860)(lVar2,1);
	 *     return;
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3221FBC VA: 0x781890CFBC
	private void Chase(UnityEngine.Transform target);
	/*
	 *   void *obj;
	 *   long lVar1;
	 *   UnityEngine_Vector3 UVar2;
	 *   float fStack_2c;
	 *   float fStack_28;
	 *   float fStack_24;
	 *
	 *   if (target != null) {
	 *     obj = this.agent;
	 *     UVar2 = UnityEngine.Transform.get_position(target);
	 *     fStack_24 = UVar2.z;
	 *     fStack_28 = UVar2.y;
	 *     fStack_2c = UVar2.x;
	 *     if (obj != null) {
	 *       if ((bRam000000000755cc30 & 1) == 0) {
	 *         func_0x031fdc8c(PTR_DAT_0714d7a8,0);
	 *         bRam000000000755cc30 = 1;
	 *       }
	 *       if (obj != null) {
	 *         lVar1 = *(long *)((long)obj + 0x10);
	 *         if (lVar1 == 0) {
	 *           UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *         }
	 *         if (pcRam000000000755cc48 == null) {
	 *           pcRam000000000755cc48 = (code *)func_0x031fdc50(&UNK_01356108);
	 *         }
	 *         (*pcRam000000000755cc48)(lVar1,&fStack_2c);
	 *         return;
	 *       }
	 *       IL2CPP.ThrowNullReferenceException();
	 *     }
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x3221BC0 VA: 0x781890CBC0
	private void Wander();
	/*
	 *   uint uVar1;
	 *   long lVar2;
	 *   void *pvVar3;
	 *   void *obj;
	 *   UnityEngine_Vector3 UVar4;
	 *   float fStack_2c;
	 *   float fStack_28;
	 *   float fStack_24;
	 *
	 *   if (this.points != null) {
	 *     lVar2 = *(long *)((long)this.points + 0x18);
	 *     if (lVar2 == 0) {
	 *       return;
	 *     }
	 *     uVar1 = Random.Range(0,(int)lVar2);
	 *     pvVar3 = this.points;
	 *     if (pvVar3 != null) {
	 *       if (*(uint *)((long)pvVar3 + 0x18) <= uVar1) {
	 *         IL2CPP.ThrowIndexOutOfRangeException();
	 *       }
	 *       pvVar3 = *(void **)((long)pvVar3 + (long)(int)uVar1 * 8 + 0x20);
	 *       if (pvVar3 != null) {
	 *         obj = this.agent;
	 *         UVar4 = UnityEngine.Transform.get_position(pvVar3);
	 *         fStack_24 = UVar4.z;
	 *         fStack_28 = UVar4.y;
	 *         fStack_2c = UVar4.x;
	 *         if (obj != null) {
	 *           if ((bRam000000000755cc30 & 1) == 0) {
	 *             func_0x031fdc8c(PTR_DAT_0714d7a8,0);
	 *             bRam000000000755cc30 = 1;
	 *           }
	 *           if (obj != null) {
	 *             lVar2 = *(long *)((long)obj + 0x10);
	 *             if (lVar2 == 0) {
	 *               UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException(obj);
	 *             }
	 *             if (pcRam000000000755cc48 == null) {
	 *               pcRam000000000755cc48 = (code *)func_0x031fdc50(&UNK_01356108);
	 *             }
	 *             (*pcRam000000000755cc48)(lVar2,&fStack_2c);
	 *             return;
	 *           }
	 *           IL2CPP.ThrowNullReferenceException();
	 *         }
	 *       }
	 *     }
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x322207C VA: 0x781890D07C
	private void OnDrawGizmosSelected();
	/*
	 *   void *this_00;
	 *   float fVar1;
	 *   UnityEngine_Vector3 UVar2;
	 *   UnityEngine_Color value;
	 *   float fStack_2c;
	 *   float fStack_28;
	 *   float fStack_24;
	 *
	 *   value.b = 0.0;
	 *   value.a = 1.0;
	 *   value.r = 1.0;
	 *   value.g = 0.0;
	 *   UnityEngine.Gizmos.set_color(value);
	 *   this_00 = UnityEngine.Component.get_transform(this);
	 *   if (this_00 != null) {
	 *     UVar2 = UnityEngine.Transform.get_position(this_00);
	 *     fStack_24 = UVar2.z;
	 *     fStack_28 = UVar2.y;
	 *     fStack_2c = UVar2.x;
	 *     fVar1 = this.DetectionRange;
	 *     if (pcRam000000000755e198 == null) {
	 *       pcRam000000000755e198 = (code *)func_0x031fdc50(&UNK_01388e54);
	 *     }
	 *     (*pcRam000000000755e198)(fVar1,&fStack_2c);
	 *     return;
	 *   }
	 *   IL2CPP.ThrowNullReferenceException();
	 */
	// RVA: 0x32220C8 VA: 0x781890D0C8
	public void .ctor();
	/*
	 *   undefined4 uVar1;
	 *   undefined *puVar2;
	 *   void *pvVar3;
	 *
	 *   puVar2 = PTR_DAT_070c0a78;
	 *   if ((bRam000000000754a8cf & 1) == 0) {
	 *     func_0x031fdc8c(PTR_DAT_070c0a78);
	 *     bRam000000000754a8cf = 1;
	 *   }
	 *   pvVar3 = *(void **)puVar2;
	 *   this.DetectionRange = 5.0;
	 *   this.tagString = pvVar3;
	 *   func_0x031fdc38();
	 *   this.chaseDuration = 5.0;
	 *   uVar1 = _UNK_0134cc44;
	 *   this.MonsterSpeedWander = (float)_UNK_0134cc40;
	 *   puVar2 = typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8;
	 *   this.MonsterSpeedChase = (float)uVar1;
	 *   if ((bRam000000000755f76f & 1) == 0) {
	 *     func_0x031fdc8c(typeinfo_ptr_UnityEngine_CoreModule_Object_6FC07E8,0);
	 *     bRam000000000755f76f = 1;
	 *   }
	 *   if (*(int *)(*(long *)puVar2 + 0xe4) == 0) {
	 *     func_0x031fde08();
	 *   }
	 *   return;
	 */
}
