コード例 #1
0
 public string ShapeBaseDataShapeBaseDataOnThrow(coShapeBaseData thisobj, coPlayer user, int amount)
 {
     // Invoked when the object is thrown.  This method should
     // construct and return the actual mission object to be
     // physically thrown.  This method is also responsible for
     // decrementing the user's inventory.
     return("0");
 }
コード例 #2
0
 public string ShapeBaseDataShapeBaseDataOnPickup(coShapeBaseData thisobj, coItem obj, coPlayer user, int amount)
 {
     // Invoked when the user attempts to pickup this datablock object.
     // The %amount argument is the space in the user's inventory for
     // this type of datablock.  This method is responsible for
     // incrementing the user's inventory is something is addded.
     // Should return true if something was added to the inventory.
     return("0");
 }
コード例 #3
0
        public void ShapeBaseDamage(coShapeBase shapebase, coShapeBase sourceobject, Point3F position, float damage, string damagetype)
        {
            // All damage applied by one object to another should go through this method.
            // This function is provided to allow objects some chance of overriding or
            // processing damage values and types.  As opposed to having weapons call
            // ShapeBase::applyDamage directly. Damage is redirected to the datablock,
            // this is standard procedure for many built in callbacks.


            if (shapebase.isObject())
            {
                coShapeBaseData datablock = shapebase.getDataBlock();
                datablock.call("damage", shapebase, position.AsString(), sourceobject, damage.AsString(), damagetype);
            }
        }
コード例 #4
0
 public string ShapeBaseDataShapeBaseDataOnUse(coShapeBaseData thisobj, coPlayer user)
 {
     //// Invoked when the object uses this datablock, should return
     //// true if the item was used.
     return("0");
 }
コード例 #5
0
 public void ShapeBaseDataDamage(coShapeBaseData thisobj, coShapeBase obj, string position, coShapeBase source, float amount, string damageType)
 {
     // Ignore damage by default. This empty method is here to
     // avoid console warnings.
 }