Example #1
0
        public void CmdSpawnPaintDrops(Color color)
        {
            var n              = Random.Range(2, 5);
            var baseVelocity   = new Vector2(7f, 2.5f).FlipDirection(eDirection);
            var positionOffset = new Vector3(.4f, .2f, 0f).FlipDirection(eDirection);
            var sharedHitSet   = new HitSet();

            for (int i = 0; i < n; i++)
            {
                var scale     = Random.Range(PaintDrop.minScale, PaintDrop.maxScale);
                var velocity  = baseVelocity + new Vector2(Random.Range(-2f, 2f), Random.Range(-1.5f, 1.5f));
                var paintDrop = SpawnPooledProjectileScaled(
                    paintDropPrefabIndex,
                    paintbrush.transform.position + positionOffset,
                    new Vector3(scale, scale, 1),
                    Quaternion.identity,
                    velocity,
                    0,
                    false
                    );
                var pd = paintDrop.GetComponent <PaintDrop>();
                pd.SetColor(color);
                pd.sSharedHitSet = sharedHitSet;
            }
        }
Example #2
0
 void Start()
 {
     spriteRenderers      = GetComponentsInChildren <SpriteRenderer>();
     attachedHandCollider = attachedHand.GetComponent <Collider2D>();
     hits          = new HitSet();
     colliderCount = new ColliderCount();
     Hide();
 }
Example #3
0
 public CalcBook()
 {
     hits          = new HitSet();
     colliderCount = new ColliderCount();
 }
Example #4
0
 public CoverageModule(string name)
 {
     hits_ = new HitSet();
     name_ = name;
 }
Example #5
0
 /// <summary>
 /// copy constructor
 /// </summary>
 /// <param name="module"></param>
 public PEModule(PEModule module)
 {
     bpAddresses_ = new List<uint>(module.bpAddresses_);
     roBPAddresses_ = new ReadOnlyCollection<uint>(bpAddresses_);
     modulePath_ = module.modulePath_;
     imageBase_ = module.imageBase_;
     hitSet_ = new HitSet(imageBase_);
 }
Example #6
0
 public PEModule(string modulePath)
 {
     bpAddresses_ = new List<uint>();
     roBPAddresses_ = new ReadOnlyCollection<uint>(bpAddresses_);
     loadModuleFile(modulePath);
     hitSet_ = new HitSet(imageBase_);
 }
Example #7
0
 void IPoolNotificationHandler.OnRelease()
 {
     sSharedHitSet = null;
     Disable();
     PooledObject.Disable(gameObject);
 }